diff options
author | David Lu <david.lu@hotmail.com> | 2016-06-27 07:45:24 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2016-06-27 07:45:24 -0400 |
commit | 3cfc369ce9266cb755edb6936e0526a6d9417629 (patch) | |
tree | 5c0545f43cf406479aab54e056bcde0842200743 | |
parent | dbd60b3f16eb83bc4db9e91169783290b3c3a056 (diff) | |
download | chat-3cfc369ce9266cb755edb6936e0526a6d9417629.tar.gz chat-3cfc369ce9266cb755edb6936e0526a6d9417629.tar.bz2 chat-3cfc369ce9266cb755edb6936e0526a6d9417629.zip |
Added error message for unchanged email (#3420)
-rw-r--r-- | webapp/components/user_settings/user_settings_general.jsx | 4 | ||||
-rw-r--r-- | webapp/i18n/en.json | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/webapp/components/user_settings/user_settings_general.jsx b/webapp/components/user_settings/user_settings_general.jsx index e586c9290..9702185c2 100644 --- a/webapp/components/user_settings/user_settings_general.jsx +++ b/webapp/components/user_settings/user_settings_general.jsx @@ -160,12 +160,12 @@ class UserSettingsGeneralTab extends React.Component { const email = this.state.email.trim().toLowerCase(); const confirmEmail = this.state.confirmEmail.trim().toLowerCase(); + const {formatMessage} = this.props.intl; if (user.email === email) { - this.updateSection(''); + this.setState({emailError: Utils.localizeMessage('user.settings.general.emailUnchanged', 'Your new email address is the same as your old email address.'), clientError: '', serverError: ''}); return; } - const {formatMessage} = this.props.intl; if (email === '' || !Utils.isEmail(email)) { this.setState({emailError: formatMessage(holders.validEmail), clientError: '', serverError: ''}); return; diff --git a/webapp/i18n/en.json b/webapp/i18n/en.json index f84e0469b..419721fb9 100644 --- a/webapp/i18n/en.json +++ b/webapp/i18n/en.json @@ -1388,6 +1388,7 @@ "user.settings.general.emailHelp4": "A verification email was sent to {email}.", "user.settings.general.emailLdapCantUpdate": "Login occurs through LDAP. Email cannot be updated. Email address used for notifications is {email}.", "user.settings.general.emailMatch": "The new emails you entered do not match.", + "user.settings.general.emailUnchanged": "Your new email address is the same as your old email address.", "user.settings.general.emptyName": "Click 'Edit' to add your full name", "user.settings.general.emptyNickname": "Click 'Edit' to add a nickname", "user.settings.general.field_handled_externally": "This field is handled through your login provider. If you want to change it, you need to do so through your login provider.", |