From 0548523e8ba7bd8e0c1c3c69ddf90e683732a473 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Wed, 20 Apr 2016 14:51:46 -0400 Subject: [PATCH] FIX: password reset UI shares state on all profile pages and stops working after first use --- .../javascripts/discourse/controllers/preferences.js.es6 | 6 ++++++ app/assets/javascripts/discourse/routes/preferences.js.es6 | 1 + 2 files changed, 7 insertions(+) diff --git a/app/assets/javascripts/discourse/controllers/preferences.js.es6 b/app/assets/javascripts/discourse/controllers/preferences.js.es6 index b237017f262..6ccc5bb22b0 100644 --- a/app/assets/javascripts/discourse/controllers/preferences.js.es6 +++ b/app/assets/javascripts/discourse/controllers/preferences.js.es6 @@ -102,6 +102,12 @@ export default Ember.Controller.extend(CanCheckEmails, { return isSaving ? I18n.t('saving') : I18n.t('save'); }, + reset() { + this.setProperties({ + passwordProgress: null + }); + }, + passwordProgress: null, actions: { diff --git a/app/assets/javascripts/discourse/routes/preferences.js.es6 b/app/assets/javascripts/discourse/routes/preferences.js.es6 index b4f0e0baf82..b26648042c0 100644 --- a/app/assets/javascripts/discourse/routes/preferences.js.es6 +++ b/app/assets/javascripts/discourse/routes/preferences.js.es6 @@ -8,6 +8,7 @@ export default RestrictedUserRoute.extend({ }, setupController(controller, user) { + controller.reset(); controller.setProperties({ model: user, newNameInput: user.get('name')