Ghost/core/client/routes/reset.js
Jason Williams 0f17378b26 Enable JSCS checking on client.
Refs #4001
- grunt-jscs@0.8.1 which provides ES6 support.
2014-10-25 16:13:04 +00:00

26 lines
786 B
JavaScript

import styleBody from 'ghost/mixins/style-body';
import loadingIndicator from 'ghost/mixins/loading-indicator';
var ResetRoute = Ember.Route.extend(styleBody, loadingIndicator, {
classNames: ['ghost-reset'],
beforeModel: function () {
if (this.get('session').isAuthenticated) {
this.notifications.showWarn('You can\'t reset your password while you\'re signed in.', {delayed: true});
this.transitionTo(SimpleAuth.Configuration.routeAfterAuthentication);
}
},
setupController: function (controller, params) {
controller.token = params.token;
},
// Clear out any sensitive information
deactivate: function () {
this._super();
this.controller.clearData();
}
});
export default ResetRoute;