From b0642d67ae6a9a7e7bbb8b8dc7a832c26bb211af Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Mon, 1 Feb 2010 17:34:26 -0800 Subject: Bug 487508: Allow restricting the visibility of custom fields and values by component r=dkl, a=mkanat --- template/en/default/bug/field.html.tmpl | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'template/en/default/bug/field.html.tmpl') diff --git a/template/en/default/bug/field.html.tmpl b/template/en/default/bug/field.html.tmpl index bb678d79d..ac62bf7ba 100644 --- a/template/en/default/bug/field.html.tmpl +++ b/template/en/default/bug/field.html.tmpl @@ -40,12 +40,10 @@ #%] [% SET hidden = 0 %] -[% IF field.visibility_field.defined %] - [% IF !bug.${field.visibility_field.name} - .contains(field.visibility_value.name) - %] - [% SET hidden = 1 %] - [% END %] +[% IF field.visibility_field.defined AND bug + AND !field.visibility_value.is_set_on_bug(bug) +%] + [% SET hidden = 1 %] [% END %] [% IF NOT no_tds %] @@ -138,8 +136,6 @@ [% legal_values = field.legal_values %] [% END %] [% FOREACH legal_value = legal_values %] - [% SET control_value = legal_value.visibility_value %] - [% SET control_field = field.value_field %]