From a9822ceefb563a54420f13b2395b8c1359833778 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Sat, 25 Oct 2008 04:14:56 +0000 Subject: Bug 458436: Allow standard global select fields to control visibility of custom fields Patch By Max Kanat-Alexander r=bbaetz, a=mkanat --- .../en/default/admin/custom_fields/cf-js.js.tmpl | 3 +- .../default/admin/custom_fields/create.html.tmpl | 3 +- .../en/default/admin/custom_fields/edit.html.tmpl | 4 +- template/en/default/bug/create/create.html.tmpl | 48 ++++++++++++++++------ template/en/default/bug/edit.html.tmpl | 31 +++++++++++--- template/en/default/bug/field.html.tmpl | 30 ++++++++++---- template/en/default/bug/knob.html.tmpl | 11 +++++ 7 files changed, 96 insertions(+), 34 deletions(-) (limited to 'template/en') diff --git a/template/en/default/admin/custom_fields/cf-js.js.tmpl b/template/en/default/admin/custom_fields/cf-js.js.tmpl index 863f14dca..bf72ff998 100644 --- a/template/en/default/admin/custom_fields/cf-js.js.tmpl +++ b/template/en/default/admin/custom_fields/cf-js.js.tmpl @@ -24,8 +24,7 @@ function toggleCheckbox(this_checkbox, other_checkbox_id) { } var select_values = new Array(); -[% FOREACH sel_field = Bugzilla.active_custom_fields %] - [% NEXT IF !sel_field.is_select %] +[% FOREACH sel_field = Bugzilla.get_fields({ is_select => 1 }) %] select_values[[% sel_field.id FILTER js %]] = [ [% FOREACH legal_value = sel_field.legal_values %] [[% legal_value.id FILTER js %], '[% legal_value.name FILTER html %]'], diff --git a/template/en/default/admin/custom_fields/create.html.tmpl b/template/en/default/admin/custom_fields/create.html.tmpl index da10c7bcb..17bd5bfdc 100644 --- a/template/en/default/admin/custom_fields/create.html.tmpl +++ b/template/en/default/admin/custom_fields/create.html.tmpl @@ -99,8 +99,7 @@ - [% FOREACH sel_field = Bugzilla.active_custom_fields %] - [% NEXT IF !sel_field.is_select || sel_field.id == field.id %] + [% FOREACH sel_field = Bugzilla.get_fields({ is_select => 1 }) %] + [% NEXT IF sel_field.id == field.id %]