From: lpsolit%gmail.com <> Date: Mon, 17 Mar 2008 22:06:51 +0000 (+0000) Subject: Bug 365442: If product/component does not have any flags, "Flags: / Requestee:" heade... X-Git-Tag: bugzilla-3.0.4~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77dcd37dd85b4e03bb31ad22b2f2f80baeb01e41;p=thirdparty%2Fbugzilla.git Bug 365442: If product/component does not have any flags, "Flags: / Requestee:" header should not be shown on the bug creation form - Patch by Frédéric Buclin r=wurblzap a=LpSolit --- diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl index fc6024a9e6..0c41b9e5b0 100644 --- a/template/en/default/bug/create/create.html.tmpl +++ b/template/en/default/bug/create/create.html.tmpl @@ -277,10 +277,21 @@ function handleWantsAttachment(wants_attachment) { %] [% IF product.flag_types.bug.size > 0 %] - [% PROCESS "flag/list.html.tmpl" flag_types = product.flag_types.bug - any_flags_requesteeble = 1 - flag_table_id = "bug_flags" - %] + [% display_flag_headers = 0 %] + [% any_flags_requesteeble = 0 %] + + [% FOREACH flag_type = product.flag_types.bug %] + [% NEXT UNLESS flag_type.is_active %] + [% display_flag_headers = 1 %] + [% SET any_flags_requesteeble = 1 IF flag_type.is_requestable && flag_type.is_requesteeble %] + [% END %] + + [% IF display_flag_headers %] + [% PROCESS "flag/list.html.tmpl" flag_types = product.flag_types.bug + any_flags_requesteeble = any_flags_requesteeble + flag_table_id = "bug_flags" + %] + [% END %] [% END %]