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

View File

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