mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-06 01:48:25 +02:00
fix password confirm
This commit is contained in:
@@ -266,7 +266,9 @@ define('forum/account/edit', ['forum/account/header', 'uploader', 'translator'],
|
||||
if (password.val()) {
|
||||
showSuccess(password_confirm_notify, successIcon);
|
||||
} else {
|
||||
removeAlert(password_confirm_notify);
|
||||
password_confirm_notify.parent().removeClass('alert-success alert-danger');
|
||||
password_confirm_notify.children().show();
|
||||
password_confirm_notify.find('.msg').html('');
|
||||
}
|
||||
|
||||
passwordsmatch = true;
|
||||
@@ -365,7 +367,8 @@ define('forum/account/edit', ['forum/account/header', 'uploader', 'translator'],
|
||||
|
||||
function showError(element, msg) {
|
||||
translator.translate(msg, function(msg) {
|
||||
element.html(msg);
|
||||
element.find('.msg').html(msg).siblings().hide();
|
||||
|
||||
element.parent()
|
||||
.removeClass('alert-success')
|
||||
.addClass('alert-danger');
|
||||
@@ -375,7 +378,7 @@ define('forum/account/edit', ['forum/account/header', 'uploader', 'translator'],
|
||||
|
||||
function showSuccess(element, msg) {
|
||||
translator.translate(msg, function(msg) {
|
||||
element.html(msg);
|
||||
element.find('.msg').html(msg);
|
||||
element.parent()
|
||||
.removeClass('alert-danger')
|
||||
.addClass('alert-success');
|
||||
@@ -383,10 +386,5 @@ define('forum/account/edit', ['forum/account/header', 'uploader', 'translator'],
|
||||
});
|
||||
}
|
||||
|
||||
function removeAlert(element) {
|
||||
element.html('');
|
||||
element.parent().removeClass('alert-success alert-danger');
|
||||
}
|
||||
|
||||
return AccountEdit;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user