From 3891b63a1eb52076337885487f251a10580a4a85 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Wed, 27 Apr 2016 18:50:13 +0200 Subject: Bug 218917 - Allow the login name to be different from the email address Original patch by Gervase Markham r=gerv a=dkl --- .../default/admin/users/confirm-delete.html.tmpl | 10 +++- template/en/default/admin/users/list.html.tmpl | 61 +++++++++++++--------- template/en/default/admin/users/search.html.tmpl | 1 + template/en/default/admin/users/userdata.html.tmpl | 28 ++++++++-- 4 files changed, 67 insertions(+), 33 deletions(-) (limited to 'template/en/default/admin/users') 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 @@ Field Value + [% IF !Param('use_email_as_login') %] + + Login: + [% otheruser.login FILTER html %] + + [% END %] - Login name: - [% otheruser.login FILTER html %] + Email address: + [% otheruser.email FILTER html %] Real name: 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 @@

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 %]; +[% IF NOT Param('use_email_as_login') %] + + + + [% IF editusers %] + + [% ELSE %] + [% otheruser.login FILTER html %] + [% END %] + + +[% END %] - + + + [% IF editusers %] - + [% IF editform %] [% IF !otheruser.in_group('bz_sudo_protect') %]
@@ -32,7 +50,7 @@ [% END %] [% END %] [% ELSE %] - [% otheruser.login FILTER html %] + [% otheruser.email FILTER html %] [% END %] -- cgit v1.2.3-24-g4f1b