2014-03-09 23:44:08 -04:00
|
|
|
import styleBody from 'ghost/mixins/style-body';
|
2014-06-04 23:18:23 -04:00
|
|
|
import loadingIndicator from 'ghost/mixins/loading-indicator';
|
2014-03-09 23:44:08 -04:00
|
|
|
|
2014-06-04 23:18:23 -04:00
|
|
|
var ResetRoute = Ember.Route.extend(styleBody, loadingIndicator, {
|
2014-03-31 11:57:50 +02:00
|
|
|
classNames: ['ghost-reset'],
|
2014-07-28 18:00:08 +02:00
|
|
|
beforeModel: function () {
|
|
|
|
if (this.get('session').isAuthenticated) {
|
|
|
|
this.notifications.showWarn('You can\'t reset your password while you\'re signed in.', true);
|
|
|
|
this.transitionTo(SimpleAuth.Configuration.routeAfterAuthentication);
|
|
|
|
}
|
|
|
|
},
|
2014-03-31 11:57:50 +02:00
|
|
|
setupController: function (controller, params) {
|
|
|
|
controller.token = params.token;
|
|
|
|
}
|
2014-03-09 23:44:08 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
export default ResetRoute;
|