From: <psy...@us...> - 2010-08-27 17:17:52
|
Update of /cvsroot/frenchmozilla/bugzilla/template/fr/default/bug In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv26990/template/fr/default/bug Modified Files: field-events.js.tmpl field.html.tmpl Log Message: Bug 479400: Add the ability to show or hide particular custom fields based on multiple values of another field (visibility controllers). Index: field-events.js.tmpl =================================================================== RCS file: /cvsroot/frenchmozilla/bugzilla/template/fr/default/bug/field-events.js.tmpl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- field-events.js.tmpl 14 Jul 2010 11:33:27 -0000 1.4 +++ field-events.js.tmpl 27 Aug 2010 17:17:44 -0000 1.5 @@ -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 %] Index: field.html.tmpl =================================================================== RCS file: /cvsroot/frenchmozilla/bugzilla/template/fr/default/bug/field.html.tmpl,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- field.html.tmpl 2 Aug 2010 17:23:58 -0000 1.32 +++ field.html.tmpl 27 Aug 2010 17:17:44 -0000 1.33 @@ -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 %] |