UX: after successfully submitting the forgot password form, show a new modal with a message and OK button

This commit is contained in:
Neil Lalonde 2015-11-20 17:49:17 -05:00
parent fa83e717f7
commit 4a49fbf44c
1 changed files with 9 additions and 6 deletions

View File

@ -25,14 +25,17 @@ export default Ember.Controller.extend(ModalFunctionality, {
if (data.user_found === true) { if (data.user_found === true) {
key += '_found'; 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) { self.flash(I18n.t(key, {email: escaped, username: escaped}), extraClass);
key += '_not_found';
extraClass = 'error';
} }
self.flash(I18n.t(key, {email: escaped, username: escaped}), extraClass);
}; };
var fail = function(e) { var fail = function(e) {