From: <psy...@us...> - 2008-12-29 18:23:04
|
Update of /cvsroot/frenchmozilla/bugzilla/template/fr/default/bug/create In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19124/template/fr/default/bug/create Modified Files: Tag: BZ_3_2_BRANCH create.html.tmpl Log Message: Bug 465589: Already selected user accounts are no longer displayed when usemenuforusers is enabled and the account has been disabled. Index: create.html.tmpl =================================================================== RCS file: /cvsroot/frenchmozilla/bugzilla/template/fr/default/bug/create/create.html.tmpl,v retrieving revision 1.20.2.5 retrieving revision 1.20.2.6 diff -u -d -r1.20.2.5 -r1.20.2.6 --- create.html.tmpl 19 Sep 2008 18:02:43 -0000 1.20.2.5 +++ create.html.tmpl 29 Dec 2008 18:23:00 -0000 1.20.2.6 @@ -198,11 +198,23 @@ </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> @@ -343,6 +355,7 @@ disabled => assigned_to_disabled size => 30 emptyok => 1 + custom_userlist => assignees_list %] <noscript>(Laisser vide pour assigner au responsable par défaut pour ce composant)</noscript> </td> @@ -358,6 +371,7 @@ disabled => qa_contact_disabled size => 30 emptyok => 1 + custom_userlist => qa_contacts_list %] <noscript>(Laisser vide pour assigner à contact QA par défaut)</noscript> </td> @@ -629,3 +643,21 @@ </select> </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 %] |