summaryrefslogtreecommitdiffstats
path: root/template/en/default/admin
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2008-10-25 06:14:56 +0200
committermkanat%bugzilla.org <>2008-10-25 06:14:56 +0200
commita9822ceefb563a54420f13b2395b8c1359833778 (patch)
treeb860dd7ab0cf156734d8eddd5d680bab587f4185 /template/en/default/admin
parent5323ab05caef4b7a5c44fb567b412a3917272f33 (diff)
downloadbugzilla-a9822ceefb563a54420f13b2395b8c1359833778.tar.gz
bugzilla-a9822ceefb563a54420f13b2395b8c1359833778.tar.xz
Bug 458436: Allow standard global select fields to control visibility of custom fields
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=bbaetz, a=mkanat
Diffstat (limited to 'template/en/default/admin')
-rw-r--r--template/en/default/admin/custom_fields/cf-js.js.tmpl3
-rw-r--r--template/en/default/admin/custom_fields/create.html.tmpl3
-rw-r--r--template/en/default/admin/custom_fields/edit.html.tmpl4
3 files changed, 4 insertions, 6 deletions
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 @@
<select name="visibility_field_id" id="visibility_field_id"
onchange="onChangeVisibilityField()">
<option></option>
- [% FOREACH sel_field = Bugzilla.active_custom_fields %]
- [% NEXT IF !sel_field.is_select %]
+ [% FOREACH sel_field = Bugzilla.get_fields({ is_select => 1 }) %]
<option value="[% sel_field.id FILTER html %]">
[% sel_field.description FILTER html %]
([% sel_field.name FILTER html %])
diff --git a/template/en/default/admin/custom_fields/edit.html.tmpl b/template/en/default/admin/custom_fields/edit.html.tmpl
index 2186c7562..3d7355a77 100644
--- a/template/en/default/admin/custom_fields/edit.html.tmpl
+++ b/template/en/default/admin/custom_fields/edit.html.tmpl
@@ -84,8 +84,8 @@
<select name="visibility_field_id" id="visibility_field_id"
onchange="onChangeVisibilityField()">
<option></option>
- [% 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 %]
<option value="[% sel_field.id FILTER html %]"
[% ' selected="selected"'
IF sel_field.id == field.visibility_field.id %]>