summaryrefslogtreecommitdiffstats
path: root/template
diff options
context:
space:
mode:
Diffstat (limited to 'template')
-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> |