UX: Don't disable submit button before transitioning in 2FA flow.

This commit is contained in:
Guo Xiang Tan 2018-02-23 10:02:08 +08:00
parent 2e2da3a6e2
commit 5e60f6b533
1 changed files with 5 additions and 2 deletions

View File

@ -26,14 +26,17 @@ export default Ember.Controller.extend({
.then(response => {
if (response.error) {
this.set('errorMessage', response.error);
this.set('loading', false);
return;
}
this.set('errorMessage',null);
DiscourseURL.redirectTo(userPath(`${this.get('content').username.toLowerCase()}/preferences`));
})
.catch(popupAjaxError)
.finally(() => this.set('loading', false));
.catch(error => {
this.set('loading', false);
popupAjaxError(error);
});
},
actions: {