mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Fix call to this.notification
Refs #5351 - Injected services need to be accessed via .get().
This commit is contained in:
parent
6651dc5ed3
commit
c1adf0b94f
1 changed files with 4 additions and 3 deletions
|
@ -40,10 +40,11 @@ export default Ember.Controller.extend(ValidationEngine, {
|
||||||
|
|
||||||
forgotten: function () {
|
forgotten: function () {
|
||||||
var email = this.get('model.identification'),
|
var email = this.get('model.identification'),
|
||||||
|
notifications = this.get('notifications'),
|
||||||
self = this;
|
self = this;
|
||||||
|
|
||||||
if (!email) {
|
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);
|
self.set('submitting', true);
|
||||||
|
@ -58,10 +59,10 @@ export default Ember.Controller.extend(ValidationEngine, {
|
||||||
}
|
}
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
self.set('submitting', false);
|
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) {
|
}).catch(function (resp) {
|
||||||
self.set('submitting', false);
|
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…
Add table
Reference in a new issue