Added error message for unchanged email (#3420)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
dbd60b3f16
Коммит
3cfc369ce9
@@ -160,12 +160,12 @@ class UserSettingsGeneralTab extends React.Component {
|
|||||||
const email = this.state.email.trim().toLowerCase();
|
const email = this.state.email.trim().toLowerCase();
|
||||||
const confirmEmail = this.state.confirmEmail.trim().toLowerCase();
|
const confirmEmail = this.state.confirmEmail.trim().toLowerCase();
|
||||||
|
|
||||||
|
const {formatMessage} = this.props.intl;
|
||||||
if (user.email === email) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const {formatMessage} = this.props.intl;
|
|
||||||
if (email === '' || !Utils.isEmail(email)) {
|
if (email === '' || !Utils.isEmail(email)) {
|
||||||
this.setState({emailError: formatMessage(holders.validEmail), clientError: '', serverError: ''});
|
this.setState({emailError: formatMessage(holders.validEmail), clientError: '', serverError: ''});
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -1388,6 +1388,7 @@
|
|||||||
"user.settings.general.emailHelp4": "A verification email was sent to {email}.",
|
"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.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.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.emptyName": "Click 'Edit' to add your full name",
|
||||||
"user.settings.general.emptyNickname": "Click 'Edit' to add a nickname",
|
"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.",
|
"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.",
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user