From 43a2416049c49a85ce84ede5567889d061a4e946 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Mon, 29 Dec 2008 00:02:12 +0000 Subject: Bug 465589: Already selected user accounts are no longer displayed when usemenuforusers is enabled and the account has been disabled - Patch by Frédéric Buclin r=wicked a=LpSolit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/en/default/global/userselect.html.tmpl | 27 ++++++++++++++++--------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'template/en/default/global') diff --git a/template/en/default/global/userselect.html.tmpl b/template/en/default/global/userselect.html.tmpl index e27ca0d6f..35075ef9d 100644 --- a/template/en/default/global/userselect.html.tmpl +++ b/template/en/default/global/userselect.html.tmpl @@ -11,6 +11,7 @@ # The Original Code is the Bugzilla Bug Tracking System. # # Contributor(s): Byron Jones + # Frédéric Buclin #%] [%# INTERFACE: @@ -23,7 +24,6 @@ # size: optional, input only; size attribute value # emptyok: optional, select only; if true, prepend menu option to start of select # multiple: optional, do multiselect box, value is size (height) of box - # do_not_change: optional, contains the string meaning "do not alter this role" # custom_userlist: optional, specify a limited list of users to use #%] @@ -39,27 +39,34 @@ [% END %] - [% IF do_not_change %] - - [% END %] - [% UNLESS custom_userlist %] [% custom_userlist = user.get_userlist %] [% END %] [% SET selected = {} %] - [% FOREACH selected_value IN value.split(', ') %] - [% SET selected.$selected_value = 1 %] + [% IF value.defined %] + [% FOREACH selected_value IN value.split(', ') %] + [% SET selected.$selected_value = 1 %] + [% END %] [% END %] + [% FOREACH tmpuser = custom_userlist %] [% IF tmpuser.visible OR selected.${tmpuser.login} == 1 %] [% END %] [% END %] + + [%# If the list is not empty, this means some accounts have not been mentioned yet. %] + [% FOREACH selected_user = selected.keys %] + + [% END %] [% ELSE %]