From e039ec50321504a5c3eb4fad542d39b878976d8c Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Tue, 25 Aug 2015 10:54:39 +0100 Subject: [PATCH] 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 --- core/client/app/controllers/setup/three.js | 4 ++-- core/client/app/controllers/setup/two.js | 1 - core/client/app/routes/setup.js | 4 ++++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/core/client/app/controllers/setup/three.js b/core/client/app/controllers/setup/three.js index 00510a51cc..9398970c1f 100644 --- a/core/client/app/controllers/setup/three.js +++ b/core/client/app/controllers/setup/three.js @@ -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'); } } }); diff --git a/core/client/app/controllers/setup/two.js b/core/client/app/controllers/setup/two.js index 4daa93da04..593c32b250 100644 --- a/core/client/app/controllers/setup/two.js +++ b/core/client/app/controllers/setup/two.js @@ -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]) diff --git a/core/client/app/routes/setup.js b/core/client/app/routes/setup.js index a1397f98ab..edba70ee7e 100644 --- a/core/client/app/routes/setup.js +++ b/core/client/app/routes/setup.js @@ -31,5 +31,9 @@ export default Ember.Route.extend(styleBody, { return self.transitionTo('signin'); } }); + }, + deactivate: function () { + this._super(); + this.controllerFor('setup/two').set('password', ''); } });