]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 365442: If product/component does not have any flags, "Flags: / Requestee:" heade...
authorlpsolit%gmail.com <>
Mon, 17 Mar 2008 22:06:51 +0000 (22:06 +0000)
committerlpsolit%gmail.com <>
Mon, 17 Mar 2008 22:06:51 +0000 (22:06 +0000)
template/en/default/bug/create/create.html.tmpl

index fc6024a9e676c50e833197f638192c884462bc2d..0c41b9e5b0b3f46bea9c1b35a0fcb2899c3d40df 100644 (file)
@@ -277,10 +277,21 @@ function handleWantsAttachment(wants_attachment) {
     %]
     <td rowspan="[% num_rows FILTER html %]" valign="top">
       [% 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 %]
     </td>
   </tr>