diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2012-02-29 22:38:42 +0100 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2012-02-29 22:38:42 +0100 |
commit | 07fbbbb38bdb82896d39d32d6d5fdecbec53cbb6 (patch) | |
tree | b3b59e68e5fe63e5c58aa5dd8a3558893d19fb4d /template/en/default/bug | |
parent | bd9b4e99a6f4640c155468aea101db32ba9559b8 (diff) | |
parent | bda60403ea62b195b678dff88387d9b392c7f4be (diff) | |
download | bugzilla-07fbbbb38bdb82896d39d32d6d5fdecbec53cbb6.tar.gz bugzilla-07fbbbb38bdb82896d39d32d6d5fdecbec53cbb6.tar.xz |
merged with bugzilla/4.2
Diffstat (limited to 'template/en/default/bug')
-rw-r--r-- | template/en/default/bug/create/create.html.tmpl | 2 | ||||
-rw-r--r-- | template/en/default/bug/field-events.js.tmpl | 12 | ||||
-rw-r--r-- | template/en/default/bug/field.html.tmpl | 3 |
3 files changed, 14 insertions, 3 deletions
diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl index d6911770a..32f39a3c5 100644 --- a/template/en/default/bug/create/create.html.tmpl +++ b/template/en/default/bug/create/create.html.tmpl @@ -277,7 +277,7 @@ TUI_hide_default('attachment_text_field'); <script type="text/javascript"> <!-- [%+ INCLUDE "bug/field-events.js.tmpl" - field = bug_fields.component %] + field = bug_fields.component, product = product %] //--> </script> </td> diff --git a/template/en/default/bug/field-events.js.tmpl b/template/en/default/bug/field-events.js.tmpl index 94dd298f5..13ec18d38 100644 --- a/template/en/default/bug/field-events.js.tmpl +++ b/template/en/default/bug/field-events.js.tmpl @@ -19,6 +19,8 @@ [%# INTERFACE: # field: a Bugzilla::Field object + # product: (optional) a Bugzilla::Product object. When specified, + # components are restricted to this product. #%] [% FOREACH controlled_field = field.controls_visibility_of %] @@ -29,7 +31,15 @@ [%- END %] ]); [% END %] -[% FOREACH legal_value = field.legal_values %] + +[% legal_values = [] %] +[% IF field.name == "component" AND product %] + [% legal_values = product.components %] +[% ELSE %] + [% legal_values = field.legal_values %] +[% END %] + +[% FOREACH legal_value = legal_values %] [% FOREACH controlled_field = legal_value.controlled_values.keys %] [% SET cont_ids = [] %] [% FOREACH val = legal_value.controlled_values.$controlled_field %] diff --git a/template/en/default/bug/field.html.tmpl b/template/en/default/bug/field.html.tmpl index 29cf82a62..a7e318c4d 100644 --- a/template/en/default/bug/field.html.tmpl +++ b/template/en/default/bug/field.html.tmpl @@ -173,7 +173,8 @@ <script type="text/javascript"> <!-- initHidingOptionsForIE('[% field.name FILTER js %]'); - [%+ INCLUDE "bug/field-events.js.tmpl" field = field %] + [%+ INCLUDE "bug/field-events.js.tmpl" + field = field, product = bug.product_obj %] //--> </script> |