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 --- template/en/default/global/messages.html.tmpl | 19 ++++++-- template/en/default/global/user-error.html.tmpl | 61 +++++++++++++++++++------ template/en/default/global/user.html.tmpl | 20 ++++---- 3 files changed, 72 insertions(+), 28 deletions(-) (limited to 'template/en/default/global') diff --git a/template/en/default/global/messages.html.tmpl b/template/en/default/global/messages.html.tmpl index 77b13859c..9f6464601 100644 --- a/template/en/default/global/messages.html.tmpl +++ b/template/en/default/global/messages.html.tmpl @@ -22,7 +22,7 @@ [% ELSIF message_tag == "account_creation_canceled" %] [% title = "User Account Creation Canceled" %] - The creation of the user account [% account FILTER html %] has been + The creation of the user account '[% login FILTER html %]' has been canceled. [% ELSIF message_tag == "account_updated" %] @@ -35,6 +35,8 @@
  • [% IF field == 'login_name' %] The login is now [% otheruser.login FILTER html %]. + [% ELSIF field == 'email' %] + The email is now [% otheruser.email FILTER html %]. [% ELSIF field == 'realname' %] The real name has been updated. [% ELSIF field == 'cryptpassword' %] @@ -89,8 +91,8 @@ successfully. [% ELSIF message_tag == "account_disabled" %] - Logging in with this user account [% account FILTER html %] is disabled, so - you cannot change its password. + Logging in with the user account with email address [% email FILTER html %] + is disabled, so you cannot change its password. [% ELSIF message_tag == "attachment_creation_failed" %] The [% terms.bug %] was created successfully, but attachment creation @@ -496,7 +498,7 @@ [%+ terms.Bugzilla %]... [% ELSIF message_tag == "migrate_user_created" %] - User created: [% created.email FILTER html %] + User created: [% created.login FILTER html %] [% IF password %] Password: [% password FILTER html %][% END %] [% ELSIF message_tag == "migrate_value_created" %] @@ -506,6 +508,10 @@ [%+ field_descs.${field.name} FILTER html %] value created: [% value FILTER html %] + [% ELSIF message_tag == "email_changed" %] + [% title = "Email Changed" %] + Your email address has been updated. + [% ELSIF message_tag == "milestone_created" %] [% title = "Milestone Created" %] The milestone [% milestone.name FILTER html %] has been created. @@ -561,7 +567,7 @@ [% ELSIF message_tag == "password_change_request" %] [% title = "Request to Change Password" %] A token for changing your password has been emailed to - [% login_name FILTER html %]. + [% email FILTER html %]. Follow the instructions in that email to change your password. [% ELSIF message_tag == "password_changed" %] @@ -639,6 +645,9 @@ [% title = BLOCK %]Flag Type '[% flag_type.name FILTER html %]' Deactivated[% END %] The flag type [% flag_type.name FILTER html %] has been deactivated. + [% ELSIF message_tag == "install_admin_get_login" %] + Enter the login name the administrator will log in with: + [% ELSIF message_tag == "install_admin_get_email" %] Enter the e-mail address of the administrator: diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl index bd8c54f2d..bdb90a2a2 100644 --- a/template/en/default/global/user-error.html.tmpl +++ b/template/en/default/global/user-error.html.tmpl @@ -55,10 +55,12 @@ [% ELSIF error == "account_exists" %] [% title = "Account Already Exists" %] There is already an account with - [% IF email %] - the login name [% email FILTER html %]. + [% IF login %] + the login name [% login FILTER html %]. + [% ELSIF email %] + the email address [% email FILTER html %]. [% ELSE %] - that login name. + that login name or email address. [% END %] [% ELSIF error == "account_locked" %] @@ -523,9 +525,18 @@ [% title = "Email Change Already In Progress" %] Email change already in progress; please check your email. + [% ELSIF error == "email_needed_for_password_change" %] + [% title = "Email Address Required" %] + You must enter an email address when requesting to change your password. + [% ELSIF error == "email_no_body" %] Your message did not contain any text, as far as we could tell. + [% ELSIF error == "email_required" %] + [% title = "Email Address Required" %] + [% admindocslinks = {'useradmin.html' => 'User administration'} %] + You must enter an email address for the new user. + [% ELSIF error == "empty_group_description" %] [% title = "The group description cannot be empty" %] You must enter a description for the group. @@ -969,10 +980,10 @@ [% IF format %] Please use the format '[% format FILTER html %]'. [% END %] - + [% ELSIF error == "illegal_email_address" %] [% title = "Invalid Email Address" %] - The e-mail address you entered ([% addr FILTER html %]) + The e-mail address you entered ([% email FILTER html %]) didn't pass our syntax checking for a legal email address. [% IF default %] A legal address must contain exactly one '@', @@ -1076,6 +1087,12 @@ [% title = "Invalid Dimensions" %] The width or height specified is not a positive integer. + [% ELSIF error == "invalid_email" %] + [% title = "Invalid Email Address" %] + The address [% email FILTER html %] is not a valid email address. + Either you misspelled it, or the person has not + registered for a [% terms.Bugzilla %] account. + [% ELSIF error == "invalid_format" %] [% title = "Invalid Format" %] The format "[% format FILTER html %]" is invalid (must be one of @@ -1208,18 +1225,28 @@ [% ELSIF error == "keyword_blank_description" %] [% title = "Blank Keyword Description Not Allowed" %] You must enter a non-blank description for the keyword. - + [% ELSIF error == "keyword_blank_name" %] [% title = "Blank Keyword Name Not Allowed" %] You must enter a non-blank name for the keyword. - + [% ELSIF error == "keyword_invalid_name" %] [% title = "Invalid Keyword Name" %] You may not use commas or whitespace in a keyword name. - - [% ELSIF error == "login_needed_for_password_change" %] - [% title = "Login Name Required" %] - You must enter a login name when requesting to change your password. + + [% ELSIF error == "login_at_sign_disallowed" %] + [% title = "Illegal Character in Login" %] + Login names may not contain the "@" sign unless you are setting your + login name to be identical to your email address. + + [% ELSIF error == "login_change_during_email_change" %] + [% title = "Login Change Not Permitted" %] + You may not change your login name while you are in the middle of the + process of changing your email address. + + [% ELSIF error == "login_illegal_character" %] + [% title = "Illegal Character In Login" %] + Login names are not allowed to contain space characters. [% ELSIF error == "login_required_for_pronoun" %] [% title = "Login Name Required" %] @@ -1230,6 +1257,10 @@ [%# Used for non-web-based LOGIN_REQUIRED situations. %] You must log in before using this part of [% terms.Bugzilla %]. + [% ELSIF error == "login_too_long" %] + [% title = "Login Too Long" %] + Your login name is too long. It cannot exceed 127 characters. + [% ELSIF error == "markdown_disabled" %] Markdown feature is not enabled. @@ -1495,8 +1526,8 @@ You did not enter your current password correctly. [% ELSIF error == "current_password_required" %] - [% title = "Old Password Required" %] - You must enter your old password to change your email address. + [% title = "Current Password Required" %] + You must enter your current password to edit your account. [% ELSIF error == "password_change_requests_not_allowed" %] [% title = "Password Change Requests Not Allowed" %] @@ -1511,7 +1542,7 @@ The password must be at least [%+ constants.USER_PASSWORD_MIN_LENGTH FILTER html %] characters long. [% IF locked_user %] - You must + You must request a new password in order to log in again. [% END %] @@ -1532,7 +1563,7 @@ [% END %] [% IF locked_user %] - You must + You must request a new password in order to log in again. [% END %] diff --git a/template/en/default/global/user.html.tmpl b/template/en/default/global/user.html.tmpl index 7050c6d37..0ee303fe9 100644 --- a/template/en/default/global/user.html.tmpl +++ b/template/en/default/global/user.html.tmpl @@ -12,15 +12,19 @@ [% FILTER collapse %] - [% IF user.id %] - ' IF user.id %] [% ELSE %] - [% who.login FILTER email FILTER html %] + [% who.identity FILTER html %] [% END %] - [% '' IF user.id %] [% END %] -- cgit v1.2.3-24-g4f1b