diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2016-04-27 18:50:13 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2016-04-27 18:50:13 +0200 |
commit | 3891b63a1eb52076337885487f251a10580a4a85 (patch) | |
tree | db1463894b756a6bb5114644feeec704ec886eb5 /template/en/default/admin/users | |
parent | c44470a368465adfe329fcfc32492829a21878da (diff) | |
download | bugzilla-3891b63a1eb52076337885487f251a10580a4a85.tar.gz bugzilla-3891b63a1eb52076337885487f251a10580a4a85.tar.xz |
Bug 218917 - Allow the login name to be different from the email address
Original patch by Gervase Markham
r=gerv a=dkl
Diffstat (limited to 'template/en/default/admin/users')
-rw-r--r-- | template/en/default/admin/users/confirm-delete.html.tmpl | 10 | ||||
-rw-r--r-- | template/en/default/admin/users/list.html.tmpl | 61 | ||||
-rw-r--r-- | template/en/default/admin/users/search.html.tmpl | 1 | ||||
-rw-r--r-- | template/en/default/admin/users/userdata.html.tmpl | 28 |
4 files changed, 67 insertions, 33 deletions
diff --git a/template/en/default/admin/users/confirm-delete.html.tmpl b/template/en/default/admin/users/confirm-delete.html.tmpl index 4dab8b471..07b6ccb25 100644 --- a/template/en/default/admin/users/confirm-delete.html.tmpl +++ b/template/en/default/admin/users/confirm-delete.html.tmpl @@ -51,9 +51,15 @@ <th>Field</th> <th>Value</th> </tr> + [% IF !Param('use_email_as_login') %] + <tr> + <th>Login:</th> + <td>[% otheruser.login FILTER html %]</td> + </tr> + [% END %] <tr> - <th>Login name:</th> - <td>[% otheruser.login FILTER html %]</td> + <th>Email address:</th> + <td>[% otheruser.email FILTER html %]</td> </tr> <tr> <th>Real name:</th> diff --git a/template/en/default/admin/users/list.html.tmpl b/template/en/default/admin/users/list.html.tmpl index f90996882..168e6dd90 100644 --- a/template/en/default/admin/users/list.html.tmpl +++ b/template/en/default/admin/users/list.html.tmpl @@ -27,35 +27,44 @@ [% listselectionurlparams = INCLUDE listselectionurlparams %] [% columns = - [{name => 'login_name' - heading => 'Edit user...' - contentlink => 'editusers.cgi?action=edit&userid=%%userid%%' _ - listselectionurlparams - } - {name => 'realname' - heading => 'Real name' - } - {name => 'last_seen_date' - heading => 'Last Login' - } - {heading => 'Account History' - content => 'View' - contentlink => 'editusers.cgi?action=activity' _ - '&userid=%%userid%%' _ - listselectionurlparams + [{name => 'login_name' + heading => 'Edit user...' + contentlink => 'editusers.cgi?action=edit&userid=%%userid%%' _ + listselectionurlparams + }, + {name => 'email' + heading => 'Email address' + }, + {name => 'realname' + heading => 'Real name' + }, + {name => 'last_seen_date' + heading => 'Last Login' + }, + {name => 'view_history_link', + heading => 'Account History' + content => 'View' + contentlink => 'editusers.cgi?action=activity' _ + '&userid=%%userid%%' _ + listselectionurlparams + }, + {name => 'action_link', + heading => 'Action' + content => 'Delete' + contentlink => 'editusers.cgi?action=del' _ + '&userid=%%userid%%' _ + listselectionurlparams } ] -%] + %] + +[%# Eliminate inappropriate columns, starting at the end %] +[% IF NOT (Param('allowuserdeletion') && editusers) %] + [% CALL columns.splice(5, 1) %] +[% END %] -[% IF Param('allowuserdeletion') && editusers %] - [% columns.push({heading => 'Action' - content => 'Delete' - contentlink => 'editusers.cgi?action=del' _ - '&userid=%%userid%%' _ - listselectionurlparams - } - ) - %] +[% IF Param('use_email_as_login') %] + [% CALL columns.splice(1, 1) %] [% END %] [%# Disabled users are crossed out. Missing realnames are noticed in red. %] diff --git a/template/en/default/admin/users/search.html.tmpl b/template/en/default/admin/users/search.html.tmpl index 17477a012..f71589480 100644 --- a/template/en/default/admin/users/search.html.tmpl +++ b/template/en/default/admin/users/search.html.tmpl @@ -30,6 +30,7 @@ <p><label for="matchvalue">List users with</label> <select id="matchvalue" name="matchvalue"> <option value="login_name">login name</option> + <option value="email">email address</option> <option value="realname">real name</option> <option value="userid">user id</option> </select> diff --git a/template/en/default/admin/users/userdata.html.tmpl b/template/en/default/admin/users/userdata.html.tmpl index c08cd0018..8f925e69a 100644 --- a/template/en/default/admin/users/userdata.html.tmpl +++ b/template/en/default/admin/users/userdata.html.tmpl @@ -17,13 +17,31 @@ var disable_mail_manually_set = [% (otheruser.email_disabled ? 1 : 0) FILTER js %]; </script> +[% IF NOT Param('use_email_as_login') %] + <tr> + <th><label for="login">Login:</label></th> + <td> + [% IF editusers %] + <input size="64" maxlength="255" id="login" name="login" + value="[% otheruser.login FILTER html %]" + [%- " autofocus" UNLESS editform %] required> + [% ELSE %] + [% otheruser.login FILTER html %] + [% END %] + </td> + </tr> +[% END %] <tr> - <th><label for="login">Login name:</label></th> + <th> + <label for="email"> + Email address [% ' (login)' IF Param('use_email_as_login') %]: + </label> + </th> <td> [% IF editusers %] - <input size="64" maxlength="255" id="login" name="login" - value="[% otheruser.login FILTER html %]" - [%- " autofocus" UNLESS editform %] required> + <input size="64" maxlength="255" id="email" name="email" + value="[% otheruser.email FILTER html %]" + [%- " autofocus" IF Param('use_email_as_login') AND NOT editform %] required> [% IF editform %] [% IF !otheruser.in_group('bz_sudo_protect') %] <br> @@ -32,7 +50,7 @@ [% END %] [% END %] [% ELSE %] - [% otheruser.login FILTER html %] + [% otheruser.email FILTER html %] [% END %] </td> </tr> |