Don't clear password field until setup is complete

ref #5652

- resolves issues with setup flow for the time being
- password is cleared on deactivate, rather than during step 2
- using transitionToRoute instead of transitionTo to remove deprecation warning
This commit is contained in:
Hannah Wolfe 2015-08-25 10:54:39 +01:00
parent eb1365c4f0
commit 6cb45d6939
3 changed files with 6 additions and 3 deletions

View File

@ -123,7 +123,7 @@ export default Ember.Controller.extend({
notifications.showAlert(successCount + ' ' + invitationsString + ' sent!', {type: 'success', delayed: true});
self.send('loadServerNotifications');
self.transitionTo('posts.index');
self.transitionToRoute('posts.index');
}
self.toggleProperty('submitting');
@ -143,7 +143,7 @@ export default Ember.Controller.extend({
},
skipInvite: function () {
this.send('loadServerNotifications');
this.transitionTo('posts.index');
this.transitionToRoute('posts.index');
}
}
});

View File

@ -79,7 +79,6 @@ export default Ember.Controller.extend(ValidationEngine, {
identification: self.get('email'),
password: self.get('password')
}).then(function () {
self.set('password', '');
self.set('blogCreated', true);
if (data.image) {
self.sendImage(result.users[0])

View File

@ -31,5 +31,9 @@ export default Ember.Route.extend(styleBody, {
return self.transitionTo('signin');
}
});
},
deactivate: function () {
this._super();
this.controllerFor('setup/two').set('password', '');
}
});