From 4a49fbf44c43c6e3718865ceede98dbb66390384 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Fri, 20 Nov 2015 17:49:17 -0500 Subject: [PATCH] UX: after successfully submitting the forgot password form, show a new modal with a message and OK button --- .../discourse/controllers/forgot-password.js.es6 | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/discourse/controllers/forgot-password.js.es6 b/app/assets/javascripts/discourse/controllers/forgot-password.js.es6 index 64da750cf..0eced474d 100644 --- a/app/assets/javascripts/discourse/controllers/forgot-password.js.es6 +++ b/app/assets/javascripts/discourse/controllers/forgot-password.js.es6 @@ -25,14 +25,17 @@ export default Ember.Controller.extend(ModalFunctionality, { if (data.user_found === true) { key += '_found'; - } + self.set('accountEmailOrUsername', ''); + bootbox.alert(I18n.t(key, {email: escaped, username: escaped})); + self.send("closeModal"); + } else { + if (data.user_found === false) { + key += '_not_found'; + extraClass = 'error'; + } - if (data.user_found === false) { - key += '_not_found'; - extraClass = 'error'; + self.flash(I18n.t(key, {email: escaped, username: escaped}), extraClass); } - - self.flash(I18n.t(key, {email: escaped, username: escaped}), extraClass); }; var fail = function(e) {