summaryrefslogtreecommitdiffstats
path: root/template/en/default
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-12-28 09:31:35 +0100
committerlpsolit%gmail.com <>2006-12-28 09:31:35 +0100
commit2c98905ff079153fb7491474111158261e1301f9 (patch)
tree2d11dd3584e14942140cc79a51b42fbdb0106506 /template/en/default
parent65cfd8b5587109693762e9d2cd6e7e651eb79fdd (diff)
downloadbugzilla-2c98905ff079153fb7491474111158261e1301f9.tar.gz
bugzilla-2c98905ff079153fb7491474111158261e1301f9.tar.xz
Bug 365092: Inactive flag types should be excluded from the JS array in the bug creation form - Patch by Frédéric Buclin <LpSolit@gmail.com> and Olav Vitters <bugzilla-mozilla@bkor.dhs.org> r=LpSolit a=justdave
Diffstat (limited to 'template/en/default')
-rw-r--r--template/en/default/bug/create/create.html.tmpl13
-rw-r--r--template/en/default/filterexceptions.pl2
2 files changed, 6 insertions, 9 deletions
diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl
index 5957516f9..769128164 100644
--- a/template/en/default/bug/create/create.html.tmpl
+++ b/template/en/default/bug/create/create.html.tmpl
@@ -50,17 +50,16 @@ var flags = new Array([% product.components.size %]);
[%- FOREACH c = product.components %]
components[[% count %]] = "[% c.name FILTER js %]";
initialowners[[% count %]] = "[% c.default_assignee.login FILTER js %]";
- var flag_list = new Array([% c.flag_types.bug.size + c.flag_types.attachment.size %]);
- [% flag_count = 0 %]
+ [% flag_list = [] %]
[% FOREACH f = c.flag_types.bug %]
- flag_list[[% flag_count %]] = "[% f.id %]";
- [% flag_count = flag_count + 1 %]
+ [% NEXT UNLESS f.is_active %]
+ [% flag_list.push(f.id) %]
[% END %]
[% FOREACH f = c.flag_types.attachment %]
- flag_list[[% flag_count %]] = "[% f.id %]";
- [% flag_count = flag_count + 1 %]
+ [% NEXT UNLESS f.is_active %]
+ [% flag_list.push(f.id) %]
[% END %]
- flags[[% count %]] = flag_list;
+ flags[[% count %]] = [[% flag_list.join(",") FILTER js %]];
[% IF Param("useqacontact") %]
initialqacontacts[[% count %]] = "[% c.default_qa_contact.login FILTER js %]";
[% END %]
diff --git a/template/en/default/filterexceptions.pl b/template/en/default/filterexceptions.pl
index 7321dc5b9..fe19b42d8 100644
--- a/template/en/default/filterexceptions.pl
+++ b/template/en/default/filterexceptions.pl
@@ -393,8 +393,6 @@
'sel.name',
'sel.description',
'cloned_bug_id',
- 'flag_count',
- 'f.id',
],
'bug/create/create-guided.html.tmpl' => [