0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Stop validation error notification stack

closes #3383
- Calls closePassive() if a new validation error is thrown to display
only the latest validation error
This commit is contained in:
Felix Rieseberg 2014-07-29 16:13:56 -07:00
parent 05afe8afb2
commit 7cf0a25381

View file

@ -30,10 +30,12 @@ var ForgottenController = Ember.Controller.extend(ValidationEngine, {
self.transitionToRoute('signin');
}).catch(function (resp) {
self.toggleProperty('submitting');
self.notifications.closePassive();
self.notifications.showAPIError(resp, 'There was a problem logging in, please try again.');
});
}).catch(function (errors) {
self.toggleProperty('submitting');
self.notifications.closePassive();
self.notifications.showErrors(errors);
});
}