Commit 2c98905f authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 365092: Inactive flag types should be excluded from the JS array in the bug…

Bug 365092: Inactive flag types should be excluded from the JS array in the bug creation form - Patch by Fré©ric Buclin <LpSolit@gmail.com> and Olav Vitters <bugzilla-mozilla@bkor.dhs.org> r=LpSolit a=justdave
parent 65cfd8b5
...@@ -50,17 +50,16 @@ var flags = new Array([% product.components.size %]); ...@@ -50,17 +50,16 @@ var flags = new Array([% product.components.size %]);
[%- FOREACH c = product.components %] [%- FOREACH c = product.components %]
components[[% count %]] = "[% c.name FILTER js %]"; components[[% count %]] = "[% c.name FILTER js %]";
initialowners[[% count %]] = "[% c.default_assignee.login 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_list = [] %]
[% flag_count = 0 %]
[% FOREACH f = c.flag_types.bug %] [% FOREACH f = c.flag_types.bug %]
flag_list[[% flag_count %]] = "[% f.id %]"; [% NEXT UNLESS f.is_active %]
[% flag_count = flag_count + 1 %] [% flag_list.push(f.id) %]
[% END %] [% END %]
[% FOREACH f = c.flag_types.attachment %] [% FOREACH f = c.flag_types.attachment %]
flag_list[[% flag_count %]] = "[% f.id %]"; [% NEXT UNLESS f.is_active %]
[% flag_count = flag_count + 1 %] [% flag_list.push(f.id) %]
[% END %] [% END %]
flags[[% count %]] = flag_list; flags[[% count %]] = [[% flag_list.join(",") FILTER js %]];
[% IF Param("useqacontact") %] [% IF Param("useqacontact") %]
initialqacontacts[[% count %]] = "[% c.default_qa_contact.login FILTER js %]"; initialqacontacts[[% count %]] = "[% c.default_qa_contact.login FILTER js %]";
[% END %] [% END %]
......
...@@ -393,8 +393,6 @@ ...@@ -393,8 +393,6 @@
'sel.name', 'sel.name',
'sel.description', 'sel.description',
'cloned_bug_id', 'cloned_bug_id',
'flag_count',
'f.id',
], ],
'bug/create/create-guided.html.tmpl' => [ 'bug/create/create-guided.html.tmpl' => [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment