From a20e2591e6cec0875efe8ca7df5f45bb3236befe Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Sat, 20 Jun 2015 10:29:57 +0930 Subject: [PATCH] Fix broken forgot password form. closes #116 --- js/forum/src/components/forgot-password-modal.js | 2 +- js/forum/src/components/form-modal.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/js/forum/src/components/forgot-password-modal.js b/js/forum/src/components/forgot-password-modal.js index befa231e5..891167117 100644 --- a/js/forum/src/components/forgot-password-modal.js +++ b/js/forum/src/components/forgot-password-modal.js @@ -49,7 +49,7 @@ export default class ForgotPasswordModal extends FormModal { background: true, extract: xhr => { if (xhr.status === 404) { - this.alert = new Alert({ type: 'warning', message: 'That email wasn\'t found in our database.' }); + this.alert(new Alert({ type: 'warning', message: 'That email wasn\'t found in our database.' })); throw new Error; } return null; diff --git a/js/forum/src/components/form-modal.js b/js/forum/src/components/form-modal.js index e2b11892b..f4bdfbae2 100644 --- a/js/forum/src/components/form-modal.js +++ b/js/forum/src/components/form-modal.js @@ -51,6 +51,8 @@ export default class FormModal extends Component { if (errors) { this.$('[name='+errors[0].path+']').select(); + } else { + this.$(':input:first').select(); } } }