diff options
author | David Lawrence <dlawrence@mozilla.com> | 2013-07-25 08:41:32 +0200 |
---|---|---|
committer | Byron Jones <bjones@mozilla.com> | 2013-07-25 08:41:32 +0200 |
commit | b84db39863cd55166bff584265d255a0f882e64a (patch) | |
tree | 3420f010a903c858feb715acea0ab9a7ed23e3b8 /extensions/BMO/template/en/default/bug/create | |
parent | 40fc1852a1d64e2889f0b532efa38573f41fc0e2 (diff) | |
download | bugzilla-b84db39863cd55166bff584265d255a0f882e64a.tar.gz bugzilla-b84db39863cd55166bff584265d255a0f882e64a.tar.xz |
Bug 750742: Create new BMO extension called TrackingFlags to move current tracking flags away from custom fields
Diffstat (limited to 'extensions/BMO/template/en/default/bug/create')
-rw-r--r-- | extensions/BMO/template/en/default/bug/create/create-winqual.html.tmpl | 93 |
1 files changed, 62 insertions, 31 deletions
diff --git a/extensions/BMO/template/en/default/bug/create/create-winqual.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-winqual.html.tmpl index d14cca810..fd21ed4ed 100644 --- a/extensions/BMO/template/en/default/bug/create/create-winqual.html.tmpl +++ b/extensions/BMO/template/en/default/bug/create/create-winqual.html.tmpl @@ -611,23 +611,25 @@ TUI_hide_default('expert_fields'); <tbody> [%# non-tracking flags custom fields %] -[% FOREACH field = Bugzilla.active_custom_fields %] +[% FOREACH field = Bugzilla.active_custom_fields(product=>product,type=>1) %] + [% NEXT IF field.type == constants.FIELD_TYPE_EXTENSION %] [% NEXT UNLESS field.enter_bug %] - [% NEXT IF cf_hidden_in_product(field.name, product.name, component.name, 1) %] [%# crash-signature gets custom handling %] - [% NEXT IF field.name == 'cf_crash_signature' %] - + [% IF field.name == 'cf_crash_signature' %] + [% show_crash_signature = 1 %] + [% NEXT %] + [% END %] [% SET value = ${field.name}.defined ? ${field.name} : "" %] <tr [% 'class="expert_fields"' IF !field.is_mandatory %]> - [% INCLUDE bug/field.html.tmpl - bug = default, field = field, value = value, editable = 1, + [% INCLUDE bug/field.html.tmpl + bug = default, field = field, value = value, editable = 1, value_span = 3 %] </tr> [% END %] </tbody> [%# crash-signature handling %] -[% UNLESS cf_hidden_in_product('cf_crash_signature', product.name, component.name, 1) %] +[% IF show_crash_signature %] <tbody class="expert_fields"> <tr> <th id="field_label_cf_crash_signature" class="field_label"> @@ -647,23 +649,27 @@ TUI_hide_default('expert_fields'); </tbody> [% END %] -[% display_bug_flags = 0 %] -[% FOREACH field = Bugzilla.active_custom_fields %] +[% old_tracking_flags = [] %] +[% old_project_flags = [] %] +[% FOREACH field = Bugzilla.active_custom_fields(product=>product,type=>2) %] + [% NEXT IF field.type == constants.FIELD_TYPE_EXTENSION %] [% NEXT UNLESS field.enter_bug %] - [% NEXT IF cf_hidden_in_product(field.name, product.name, component.name, 2) %] - [% display_bug_flags = 1 %] - [% LAST %] + [% IF cf_is_project_flag(field.name) %] + [% old_project_flags.push(field) %] + [% ELSE %] + [% old_tracking_flags.push(field) %] + [% END %] [% END %] [% display_flags = 0 %] [% any_flags_requesteeble = 0 %] -[% FOREACH flag_type = product.flag_types(is_active=>1).bug %] +[% FOREACH flag_type = product.flag_types.bug %] [% display_flags = 1 %] [% SET any_flags_requesteeble = 1 IF flag_type.is_requestable && flag_type.is_requesteeble %] [% LAST IF display_flags && any_flags_requesteeable %] [% END %] -[% IF display_bug_flags || display_flags %] +[% IF old_project_flags.size || old_tracking_flags.size || display_flags %] <tbody class="expert_fields"> <tr> <th>Flags:</th> @@ -680,38 +686,63 @@ TUI_hide_default('expert_fields'); <legend>Set [% terms.bug %] flags</legend> <table cellpadding="0" cellspacing="0"> - <tr> - [% IF display_bug_flags %] - <td> - <table id="bug_tracking_flags"> + <tr> + [% IF old_tracking_flags.size %] + <td [% IF project_flags.size %]rowspan="2"[% END %]> + <table class="tracking_flags"> <tr> <th colspan="2" style="text-align:left">Tracking Flags:</th> </tr> + [% FOREACH field = old_tracking_flags %] + [% SET value = ${field.name}.defined ? ${field.name} : "" %] + <tr> + [% INCLUDE bug/field.html.tmpl + bug = default + field = field + value = value + editable = 1 + value_span = 3 + %] + </tr> + [% END %] + [% Hook.process('tracking_flags_end') %] + </table> + </td> + [% END %] + [% IF old_project_flags.size %] + <td> + <table class="tracking_flags"> <tr> - [% FOREACH field = Bugzilla.active_custom_fields %] - [% NEXT UNLESS field.enter_bug %] - [% NEXT IF cf_hidden_in_product(field.name, product.name, component.name, 2) %] - - [% SET value = ${field.name}.defined ? ${field.name} : "" %] - <tr> - [% INCLUDE bug/field.html.tmpl - bug = default, field = field, value = value, editable = 1, - value_span = 3 %] - </tr> - [% END %] + <th colspan="2" style="text-align:left">Project Flags:</th> </tr> + [% FOREACH field = old_project_flags %] + [% SET value = ${field.name}.defined ? ${field.name} : "" %] + <tr> + [% INCLUDE bug/field.html.tmpl + bug = default + field = field + value = value + editable = 1 + value_span = 3 + %] + </tr> + [% END %] + [% Hook.process('project_flags_end') %] </table> </td> + </tr> + <tr> [% END %] [% IF display_flags %] <td> - [% PROCESS "flag/list.html.tmpl" flag_types = product.flag_types(is_active=>1).bug + [% PROCESS "flag/list.html.tmpl" flag_types = product.flag_types.bug any_flags_requesteeble = any_flags_requesteeble flag_table_id = "bug_flags" %] </td> [% END %] - </tr> + </tr> + [% Hook.process('bug_flags_end') %] </table> </fieldset> </div> |