]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 365092: Inactive flag types should be excluded from the JS array in the bug creat...
authorlpsolit%gmail.com <>
Thu, 28 Dec 2006 08:31:35 +0000 (08:31 +0000)
committerlpsolit%gmail.com <>
Thu, 28 Dec 2006 08:31:35 +0000 (08:31 +0000)
template/en/default/bug/create/create.html.tmpl
template/en/default/filterexceptions.pl

index 5957516f96afc4a8ec9ef8b6a4e9b26c3bf9cf7d..769128164fd08e1ad789425c35c4e73686d5feb9 100644 (file)
@@ -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 %]
index 7321dc5b9c7a1b5eb0c5d75fa1b3f71d3dd6a0b2..fe19b42d8a423ce621a927acd281b20de3389b40 100644 (file)
   'sel.name',
   'sel.description',
   'cloned_bug_id',
-  'flag_count',
-  'f.id',
 ],
 
 'bug/create/create-guided.html.tmpl' => [