From 2c98905ff079153fb7491474111158261e1301f9 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Thu, 28 Dec 2006 08:31:35 +0000 Subject: =?UTF-8?q?Bug=20365092:=20Inactive=20flag=20types=20should=20be?= =?UTF-8?q?=20excluded=20from=20the=20JS=20array=20in=20the=20bug=20creati?= =?UTF-8?q?on=20form=20-=20Patch=20by=20Fr=C3=83=C2=A9d=C3=83=C2=A9ric=20B?= =?UTF-8?q?uclin=20=20and=20Olav=20Vitters=20=20r=3DLpSolit=20a=3Djustdave?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/en/default/bug/create/create.html.tmpl | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'template/en/default/bug/create') 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 %] -- cgit v1.2.1