Node.js based forum software built for the modern web
fix: added missing translation and error state for password change
Julian Lam51b5fb982640
diff --git a/public/language/en-GB/user.json b/public/language/en-GB/user.jsonindex f5f91059be..571c9fc1bd 100644--- a/public/language/en-GB/user.json+++ b/public/language/en-GB/user.json@@ -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",diff --git a/public/src/client/account/edit/email.js b/public/src/client/account/edit/email.jsindex ae182029f0..28bac37978 100644--- a/public/src/client/account/edit/email.js+++ b/public/src/client/account/edit/email.js@@ -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]]');}