fix: added missing translation and error state for password change

v1.18.x
Julian Lam 6 years ago
parent 3859d417ce
commit 51b5fb9826

@ -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]]');
}

Loading…
Cancel
Save