summaryrefslogtreecommitdiffstats
path: root/template/en/default/bug/create/create.html.tmpl
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/bug/create/create.html.tmpl
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/bug/create/create.html.tmpl')
-rw-r--r--template/en/default/bug/create/create.html.tmpl32
1 files changed, 32 insertions, 0 deletions
diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl
index 089292603..5b99d38ba 100644
--- a/template/en/default/bug/create/create.html.tmpl
+++ b/template/en/default/bug/create/create.html.tmpl
@@ -206,11 +206,23 @@ function handleWantsAttachment(wants_attachment) {
</th>
<td>
<select name="component" onchange="set_assign_to();" size="7">
+ [%# Build the lists of assignees and QA contacts if "usemenuforusers" is enabled. %]
+ [% IF Param("usemenuforusers") %]
+ [% assignees_list = user.get_userlist.clone %]
+ [% qa_contacts_list = user.get_userlist.clone %]
+ [% END %]
+
[%- FOREACH c = product.components %]
<option value="[% c.name FILTER html %]"
[% " selected=\"selected\"" IF c.name == default.component_ %]>
[% c.name FILTER html -%]
</option>
+ [% IF Param("usemenuforusers") %]
+ [% INCLUDE build_userlist default_user = c.default_assignee,
+ userlist = assignees_list %]
+ [% INCLUDE build_userlist default_user = c.default_qa_contact,
+ userlist = qa_contacts_list %]
+ [% END %]
[%- END %]
</select>
</td>
@@ -352,6 +364,7 @@ function handleWantsAttachment(wants_attachment) {
disabled => assigned_to_disabled
size => 30
emptyok => 1
+ custom_userlist => assignees_list
%]
<noscript>(Leave blank to assign to component's default assignee)</noscript>
</td>
@@ -367,6 +380,7 @@ function handleWantsAttachment(wants_attachment) {
disabled => qa_contact_disabled
size => 30
emptyok => 1
+ custom_userlist => qa_contacts_list
%]
<noscript>(Leave blank to assign to default qa contact)</noscript>
</td>
@@ -651,3 +665,21 @@ function handleWantsAttachment(wants_attachment) {
[% END %]
</td>
[% END %]
+
+[% BLOCK build_userlist %]
+ [% user_found = 0 %]
+ [% default_login = default_user.login %]
+ [% RETURN UNLESS default_login %]
+
+ [% FOREACH user = userlist %]
+ [% IF user.login == default_login %]
+ [% user_found = 1 %]
+ [% LAST %]
+ [% END %]
+ [% END %]
+
+ [% userlist.push({login => default_login,
+ identity => default_user.identity,
+ visible => 1})
+ UNLESS user_found %]
+[% END %]