mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: change email button stays disabled if user submitted an invalid email
This commit is contained in:
@@ -29,7 +29,12 @@ define('forum/account/edit/email', ['forum/account/header', 'api'], function (he
|
|||||||
api.put('/users/' + userData.uid, userData).then((res) => {
|
api.put('/users/' + userData.uid, userData).then((res) => {
|
||||||
btn.removeClass('disabled').find('i').addClass('hide');
|
btn.removeClass('disabled').find('i').addClass('hide');
|
||||||
ajaxify.go('user/' + res.userslug + '/edit');
|
ajaxify.go('user/' + res.userslug + '/edit');
|
||||||
}).catch(app.alertError);
|
}).catch((err) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
btn.removeClass('disabled').find('i').addClass('hide');
|
||||||
|
app.alertError(err);
|
||||||
|
}, 300); // for UX: this call is too fast.
|
||||||
|
});
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user