From eca4822f0ad4733af64425c10b9edd1d7ca62772 Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Wed, 21 Dec 2011 12:42:51 -0500 Subject: merged with bmo/4.0 --- template/en/default/bug/create/create.html.tmpl | 28 ++++++++++++------------- template/en/default/bug/edit.html.tmpl | 5 ++--- template/en/default/config.rdf.tmpl | 2 +- 3 files changed, 16 insertions(+), 19 deletions(-) (limited to 'template/en/default') diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl index 26278e525..7f2ddc42f 100644 --- a/template/en/default/bug/create/create.html.tmpl +++ b/template/en/default/bug/create/create.html.tmpl @@ -80,10 +80,10 @@ var flags = new Array([% product.components.size %]); comp_desc[[% count %]] = "[% c.description FILTER html_light FILTER js %]"; initialowners[[% count %]] = "[% c.default_assignee.login FILTER js %]"; [% flag_list = [] %] - [% FOREACH f = c.flag_types(is_active=>1).bug %] + [% FOREACH f = c.flag_types.bug %] [% flag_list.push(f.id) %] [% END %] - [% FOREACH f = c.flag_types(is_active=>1).attachment %] + [% FOREACH f = c.flag_types.attachment %] [% flag_list.push(f.id) %] [% END %] flags[[% count %]] = [[% flag_list.join(",") FILTER js %]]; @@ -560,7 +560,7 @@ TUI_hide_default('attachment_text_field'); Add an attachment [% PROCESS attachment/createformcontents.html.tmpl - flag_types = product.flag_types(is_active=>1).attachment + flag_types = product.flag_types.attachment any_flags_requesteeble = 1 flag_table_id ="attachment_flags" %]
@@ -634,12 +634,13 @@ TUI_hide_default('attachment_text_field'); [%# non-tracking flags custom fields %] -[% FOREACH field = Bugzilla.active_custom_fields %] +[% FOREACH field = Bugzilla.active_custom_fields(product=>product,type=>1) %] [% 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} : "" %] [% INCLUDE bug/field.html.tmpl @@ -650,7 +651,7 @@ TUI_hide_default('attachment_text_field'); [%# crash-signature handling %] -[% UNLESS cf_hidden_in_product('cf_crash_signature', product.name, component.name, 1) %] +[% IF show_crash_signature %] @@ -671,16 +672,15 @@ TUI_hide_default('attachment_text_field'); [% END %] [% display_bug_flags = 0 %] -[% FOREACH field = Bugzilla.active_custom_fields %] +[% FOREACH field = Bugzilla.active_custom_fields(product=>product,type=>2) %] [% NEXT UNLESS field.enter_bug %] - [% NEXT IF cf_hidden_in_product(field.name, product.name, component.name, 2) %] [% display_bug_flags = 1 %] [% LAST %] [% 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 %] @@ -711,10 +711,8 @@ TUI_hide_default('attachment_text_field'); Tracking Flags: - [% FOREACH field = Bugzilla.active_custom_fields %] + [% FOREACH field = Bugzilla.active_custom_fields(product=>product,type=>2) %] [% 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} : "" %] [% INCLUDE bug/field.html.tmpl @@ -728,7 +726,7 @@ TUI_hide_default('attachment_text_field'); [% END %] [% IF display_flags %] - [% 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" %] diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl index 4d1e12597..a55be45fe 100644 --- a/template/en/default/bug/edit.html.tmpl +++ b/template/en/default/bug/edit.html.tmpl @@ -870,7 +870,7 @@ [% show_bug_flags = 0 %] [% bug_flags_set = 0 %] [% show_more_flags = 0 %] - [% FOREACH type = bug.flag_types %] + [% FOREACH type = bug.flag_types(is_active=>1) %] [% IF (type.flags && type.flags.size > 0) || (user.id && type.is_active) %] [% show_bug_flags = 1 %] [% END %] @@ -929,9 +929,8 @@ [% BLOCK section_customfields %] [%# *** Custom Fields *** %] [% USE Bugzilla %] - [% FOREACH field = Bugzilla.active_custom_fields %] + [% FOREACH field = Bugzilla.active_custom_fields(product=>bug.product_obj,component=>bug.component_obj,type=>1) %] [% NEXT IF NOT user.id AND field.value == "---" %] - [% NEXT IF cf_hidden_in_product(field.name, bug.product, bug.component, 1) %] [% PROCESS bug/field.html.tmpl value = bug.${field.name} editable = bug.check_can_change_field(field.name, 0, 1) diff --git a/template/en/default/config.rdf.tmpl b/template/en/default/config.rdf.tmpl index d7b282776..16666175f 100644 --- a/template/en/default/config.rdf.tmpl +++ b/template/en/default/config.rdf.tmpl @@ -171,7 +171,7 @@ [% IF show_flags %] - [% flag_types = component.flag_types(is_active=>1).bug.merge(component.flag_types(is_active=>1).attachment) %] + [% flag_types = component.flag_types.bug.merge(component.flag_types.attachment) %] [% FOREACH flag_type = flag_types %] [% all_visible_flag_types.${flag_type.id} = flag_type %]