mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-04 12:44:57 +03:00
6c51b5c2f2
closes #2411 - Added ForgottenController which handles the form submit event - Modified the forgotten template - Added Paths utility tool to get the root/subpath - Added ajax fixture
22 lines
618 B
JavaScript
22 lines
618 B
JavaScript
/*global console, alert */
|
|
|
|
var ForgottenController = Ember.Controller.extend({
|
|
email: '',
|
|
actions: {
|
|
submit: function () {
|
|
var self = this;
|
|
self.user.fetchForgottenPasswordFor(this.email)
|
|
.then(function () {
|
|
alert('@TODO Notification: Success');
|
|
self.transitionToRoute('signin');
|
|
})
|
|
.catch(function (response) {
|
|
alert('@TODO');
|
|
console.log(response);
|
|
});
|
|
}
|
|
}
|
|
});
|
|
|
|
export default ForgottenController;
|