mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-04 17:04:59 +03:00
Fix call to this.notification
Refs #5351 - Injected services need to be accessed via .get().
This commit is contained in:
parent
60e160d169
commit
164fa2768f
@ -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.'});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user