mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: added missing translation and error state for password change
This commit is contained in:
@@ -52,6 +52,7 @@
|
||||
"change_picture": "Change Picture",
|
||||
"change_username": "Change Username",
|
||||
"change_email": "Change Email",
|
||||
"email_same_as_password": "Please enter your current password to continue – you've entered your new email again",
|
||||
"edit": "Edit",
|
||||
"edit-profile": "Edit Profile",
|
||||
"default_picture": "Default Icon",
|
||||
|
||||
@@ -8,10 +8,11 @@ define('forum/account/edit/email', ['forum/account/header'], function (header) {
|
||||
header.init();
|
||||
|
||||
$('#submitBtn').on('click', function () {
|
||||
var curPasswordEl = $('#inputCurrentPassword');
|
||||
var userData = {
|
||||
uid: $('#inputUID').val(),
|
||||
email: $('#inputNewEmail').val(),
|
||||
password: $('#inputCurrentPassword').val(),
|
||||
password: curPasswordEl.val(),
|
||||
};
|
||||
|
||||
if (!userData.email) {
|
||||
@@ -19,6 +20,7 @@ define('forum/account/edit/email', ['forum/account/header'], function (header) {
|
||||
}
|
||||
|
||||
if (userData.email === userData.password) {
|
||||
curPasswordEl.parents('.control-group').toggleClass('has-error', true);
|
||||
return app.alertError('[[user:email_same_as_password]]');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user