summaryrefslogtreecommitdiffstats
path: root/template/en/default/global
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2008-12-29 01:02:12 +0100
committerlpsolit%gmail.com <>2008-12-29 01:02:12 +0100
commit43a2416049c49a85ce84ede5567889d061a4e946 (patch)
treee623608c6dce308e6d94a9d3a162c8ff93a95e18 /template/en/default/global
parent4240812eb919847f4a20ecbde9b946a9e8b50038 (diff)
downloadbugzilla-43a2416049c49a85ce84ede5567889d061a4e946.tar.gz
bugzilla-43a2416049c49a85ce84ede5567889d061a4e946.tar.xz
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 <LpSolit@gmail.com> r=wicked a=LpSolit
Diffstat (limited to 'template/en/default/global')
-rw-r--r--template/en/default/global/userselect.html.tmpl27
1 files changed, 17 insertions, 10 deletions
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 <bugzilla@glob.com.au>
+ # Frédéric Buclin <LpSolit@gmail.com>
#%]
[%# 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 @@
<option value=""></option>
[% END %]
- [% IF do_not_change %]
- <option value="[% do_not_change FILTER html %]">
- [% do_not_change FILTER html %]
- </option>
- [% 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 %]
<option value="[% tmpuser.login FILTER html %]"
- [% " selected=\"selected\"" IF selected.${tmpuser.login} == 1 %]
+ [% IF selected.${tmpuser.login} == 1 %]
+ selected="selected"
+ [%# A user account appears only once. Remove it from the list, so that
+ # we know if there are some selected accounts which have not been listed. %]
+ [% selected.delete(tmpuser.login) %]
+ [% END %]
>[% tmpuser.identity FILTER html %]</option>
[% END %]
[% END %]
+
+ [%# If the list is not empty, this means some accounts have not been mentioned yet. %]
+ [% FOREACH selected_user = selected.keys %]
+ <option value="[% selected_user FILTER html %]" selected="selected">[% selected_user FILTER html %]</option>
+ [% END %]
</select>
[% ELSE %]
<input