mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36: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) => {
|
||||
btn.removeClass('disabled').find('i').addClass('hide');
|
||||
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;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user