diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2013-10-11 23:44:25 +0200 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2013-10-11 23:44:25 +0200 |
commit | 0e52c06f2069cb5413abce39d6249bac73f045c8 (patch) | |
tree | 326576b9e20d428c8ddad006d29dd0bdd2b3f75d /template/en/default | |
parent | 085a562c412b8bcdedf978821222f3b6585993e5 (diff) | |
download | bugzilla-0e52c06f2069cb5413abce39d6249bac73f045c8.tar.gz bugzilla-0e52c06f2069cb5413abce39d6249bac73f045c8.tar.xz |
Bug 880829 - Migrate current custom field based tracking flags to the new Tracking Flags extension tables
r=glob
Diffstat (limited to 'template/en/default')
-rw-r--r-- | template/en/default/bug/create/create.html.tmpl | 83 | ||||
-rw-r--r-- | template/en/default/bug/edit.html.tmpl | 2 | ||||
-rw-r--r-- | template/en/default/bug/show-multiple.html.tmpl | 4 | ||||
-rw-r--r-- | template/en/default/bug/show.xml.tmpl | 1 | ||||
-rw-r--r-- | template/en/default/list/edit-multiple.html.tmpl | 1 |
5 files changed, 14 insertions, 77 deletions
diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl index 9deabac26..b357b3eb0 100644 --- a/template/en/default/bug/create/create.html.tmpl +++ b/template/en/default/bug/create/create.html.tmpl @@ -635,7 +635,7 @@ TUI_hide_default('attachment_text_field'); <tbody> [%# non-tracking flags custom fields %] -[% FOREACH field = Bugzilla.active_custom_fields(product=>product,type=>1) %] +[% FOREACH field = Bugzilla.active_custom_fields(product=>product) %] [% NEXT IF field.type == constants.FIELD_TYPE_EXTENSION %] [% NEXT UNLESS field.enter_bug %] [%# crash-signature gets custom handling %] @@ -673,18 +673,6 @@ TUI_hide_default('attachment_text_field'); </tbody> [% END %] -[% 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 %] - [% 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.bug %] @@ -693,7 +681,7 @@ TUI_hide_default('attachment_text_field'); [% LAST IF display_flags && any_flags_requesteeable %] [% END %] -[% IF old_project_flags.size || old_tracking_flags.size || display_flags %] +[% IF tracking_flags.size || display_flags %] <tbody class="expert_fields"> <tr> <th>Flags:</th> @@ -708,65 +696,18 @@ TUI_hide_default('attachment_text_field'); <fieldset> <legend>Set [% terms.bug %] flags</legend> - - <table cellpadding="0" cellspacing="0"> - <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> - <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> + <table> <tr> - [% END %] - [% IF display_flags %] - <td> - [% PROCESS "flag/list.html.tmpl" flag_types = product.flag_types.bug - any_flags_requesteeble = any_flags_requesteeble - flag_table_id = "bug_flags" - %] - </td> - [% END %] + [% Hook.process('bug_flags') %] + [% IF display_flags %] + <td> + [% 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> - [% Hook.process('bug_flags_end') %] </table> </fieldset> </div> diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl index 8c2d09872..fc0e41fe2 100644 --- a/template/en/default/bug/edit.html.tmpl +++ b/template/en/default/bug/edit.html.tmpl @@ -961,7 +961,7 @@ [% BLOCK section_customfields %] [%# *** Custom Fields *** %] [% USE Bugzilla %] - [% FOREACH field = Bugzilla.active_custom_fields(product=>bug.product_obj,component=>bug.component_obj,type=>1) %] + [% FOREACH field = Bugzilla.active_custom_fields(product=>bug.product_obj,component=>bug.component_obj) %] [% NEXT IF field.type == constants.FIELD_TYPE_EXTENSION %] [% NEXT IF NOT user.id AND field.value == "---" %] [% Hook.process('custom_field', 'bug/edit.html.tmpl') %] diff --git a/template/en/default/bug/show-multiple.html.tmpl b/template/en/default/bug/show-multiple.html.tmpl index 207b3ed86..cfd0d8e20 100644 --- a/template/en/default/bug/show-multiple.html.tmpl +++ b/template/en/default/bug/show-multiple.html.tmpl @@ -191,9 +191,7 @@ [% USE Bugzilla %] [% field_counter = 0 %] - [% FOREACH field = Bugzilla.active_custom_fields %] - [% NEXT IF cf_hidden_in_product(field.name, bug.product, bug.component) %] - [% NEXT IF cf_flag_disabled(field.name, bug) %] + [% FOREACH field = Bugzilla.active_custom_fields(product=>bug.product_obj,component=>bug.component_obj,bug_id=>bug.id) %] [% field_counter = field_counter + 1 %] [%# Odd-numbered fields get an opening <tr> %] [% '<tr>' IF field_counter % 2 %] diff --git a/template/en/default/bug/show.xml.tmpl b/template/en/default/bug/show.xml.tmpl index cb323d229..c0f32d69e 100644 --- a/template/en/default/bug/show.xml.tmpl +++ b/template/en/default/bug/show.xml.tmpl @@ -144,7 +144,6 @@ [% ELSIF field == "see_also" %] [% val = val.name %] [% END %] - [% NEXT IF cf_hidden_in_product(field.name, bug.product, bug.component) %] <[% field %][% IF name != '' %] name="[% name FILTER xml %]"[% END -%]> [%- val FILTER xml %]</[% field %]> [% END %] diff --git a/template/en/default/list/edit-multiple.html.tmpl b/template/en/default/list/edit-multiple.html.tmpl index 9ff95aad5..8f94105a7 100644 --- a/template/en/default/list/edit-multiple.html.tmpl +++ b/template/en/default/list/edit-multiple.html.tmpl @@ -284,7 +284,6 @@ [%# Show all legal values and all fields, ignoring visibility controls. %] [% bug = default.defined ? default : 0 %] [% FOREACH field = Bugzilla.active_custom_fields %] - [% NEXT IF cf_hidden_in_product(field.name, one_product, components) %] <tr> [% PROCESS bug/field.html.tmpl bug = default value = dontchange |