summaryrefslogtreecommitdiffstats
path: root/template/en
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-02-29 22:38:42 +0100
committerDave Lawrence <dlawrence@mozilla.com>2012-02-29 22:38:42 +0100
commit07fbbbb38bdb82896d39d32d6d5fdecbec53cbb6 (patch)
treeb3b59e68e5fe63e5c58aa5dd8a3558893d19fb4d /template/en
parentbd9b4e99a6f4640c155468aea101db32ba9559b8 (diff)
parentbda60403ea62b195b678dff88387d9b392c7f4be (diff)
downloadbugzilla-07fbbbb38bdb82896d39d32d6d5fdecbec53cbb6.tar.gz
bugzilla-07fbbbb38bdb82896d39d32d6d5fdecbec53cbb6.tar.xz
merged with bugzilla/4.2
Diffstat (limited to 'template/en')
-rw-r--r--template/en/default/bug/create/create.html.tmpl2
-rw-r--r--template/en/default/bug/field-events.js.tmpl12
-rw-r--r--template/en/default/bug/field.html.tmpl3
-rw-r--r--template/en/default/list/list.html.tmpl2
4 files changed, 15 insertions, 4 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>
diff --git a/template/en/default/list/list.html.tmpl b/template/en/default/list/list.html.tmpl
index 97e6c0077..ccf3427dd 100644
--- a/template/en/default/list/list.html.tmpl
+++ b/template/en/default/list/list.html.tmpl
@@ -203,7 +203,7 @@
<td valign="middle" class="bz_query_links">
<a href="buglist.cgi?
- [% urlquerypart FILTER html %]&amp;ctype=csv&human=1">CSV</a> |
+ [% urlquerypart FILTER html %]&amp;ctype=csv&amp;human=1">CSV</a> |
<a href="buglist.cgi?
[% urlquerypart FILTER html %]&amp;title=
[%- title FILTER uri %]&amp;ctype=atom">Feed</a> |