Fix call to this.notification

Refs #5351
- Injected services need to be accessed via .get().
This commit is contained in:
Jason Williams 2015-06-04 00:02:03 -05:00
parent 60e160d169
commit 164fa2768f

View File

@ -40,10 +40,11 @@ export default Ember.Controller.extend(ValidationEngine, {
forgotten: function () {
var email = this.get('model.identification'),
notifications = this.get('notifications'),
self = this;
if (!email) {
return this.notifications.showError('Enter email address to reset password.');
return notifications.showError('Enter email address to reset password.');
}
self.set('submitting', true);
@ -58,10 +59,10 @@ export default Ember.Controller.extend(ValidationEngine, {
}
}).then(function () {
self.set('submitting', false);
self.get('notifications').showSuccess('Please check your email for instructions.');
notifications.showSuccess('Please check your email for instructions.');
}).catch(function (resp) {
self.set('submitting', false);
self.get('notifications').showAPIError(resp, {defaultErrorText: 'There was a problem with the reset, please try again.'});
notifications.showAPIError(resp, {defaultErrorText: 'There was a problem with the reset, please try again.'});
});
}
}