summaryrefslogtreecommitdiffstats
path: root/template/en/default/bug
diff options
context:
space:
mode:
authorTiago Mello <timello@gmail.com>2010-08-27 05:27:08 +0200
committerTiago Mello <timello@gmail.com>2010-08-27 05:27:08 +0200
commit0844fe9fc6d2d5293fad1384d2955dedf30fc8c4 (patch)
tree636a0bbcdf71017fda712e60cd1a0dc1b7038b7b /template/en/default/bug
parentd94865b30a92be8a3a900f8d1d8262d36044b1ca (diff)
downloadbugzilla-0844fe9fc6d2d5293fad1384d2955dedf30fc8c4.tar.gz
bugzilla-0844fe9fc6d2d5293fad1384d2955dedf30fc8c4.tar.xz
Bug 479400: Add the ability to show or hide particular custom fields
based on multiple values of another field (visibility controllers) r/a=mkanat
Diffstat (limited to 'template/en/default/bug')
-rw-r--r--template/en/default/bug/field-events.js.tmpl7
-rw-r--r--template/en/default/bug/field.html.tmpl4
2 files changed, 6 insertions, 5 deletions
diff --git a/template/en/default/bug/field-events.js.tmpl b/template/en/default/bug/field-events.js.tmpl
index f9e0ea93d..94dd298f5 100644
--- a/template/en/default/bug/field-events.js.tmpl
+++ b/template/en/default/bug/field-events.js.tmpl
@@ -23,8 +23,11 @@
[% FOREACH controlled_field = field.controls_visibility_of %]
showFieldWhen('[% controlled_field.name FILTER js %]',
- '[% field.name FILTER js %]',
- '[% controlled_field.visibility_value.name FILTER js %]');
+ '[% field.name FILTER js %]', [
+ [%- FOREACH visibility_value = controlled_field.visibility_values -%]
+ '[%- visibility_value.name FILTER js -%]'[% "," UNLESS loop.last %]
+ [%- END %]
+ ]);
[% END %]
[% FOREACH legal_value = field.legal_values %]
[% FOREACH controlled_field = legal_value.controlled_values.keys %]
diff --git a/template/en/default/bug/field.html.tmpl b/template/en/default/bug/field.html.tmpl
index 49cf718cc..34347b21c 100644
--- a/template/en/default/bug/field.html.tmpl
+++ b/template/en/default/bug/field.html.tmpl
@@ -42,9 +42,7 @@
#%]
[% SET hidden = 0 %]
-[% IF field.visibility_field.defined AND bug
- AND !field.visibility_value.is_set_on_bug(bug)
-%]
+[% IF bug AND !field.is_visible_on_bug(bug) %]
[% SET hidden = 1 %]
[% END %]