diff --git a/app/components/modals/re-authenticate.js b/app/components/modals/re-authenticate.js index b3d6e5e59..df3ea710e 100644 --- a/app/components/modals/re-authenticate.js +++ b/app/components/modals/re-authenticate.js @@ -45,16 +45,17 @@ export default ModalComponent.extend(ValidationEngine, { this.set('authenticationError', null); return this.validate({property: 'signin'}).then(() => { - this._authenticate().then(() => { + return this._authenticate().then(() => { this.get('notifications').closeAlerts(); this.send('closeModal'); + return true; }).catch((error) => { if (error && error.errors) { error.errors.forEach((err) => { if (isVersionMismatchError(err)) { return this.get('notifications').showAPIError(error); } - err.message = htmlSafe(err.message); + err.message = htmlSafe(err.context || err.message); }); this.get('errors').add('password', 'Incorrect password'); @@ -64,6 +65,7 @@ export default ModalComponent.extend(ValidationEngine, { }); }, () => { this.get('hasValidated').pushObject('password'); + return false; }); }, @@ -95,9 +97,9 @@ export default ModalComponent.extend(ValidationEngine, { reauthenticate: task(function* () { if (this.get('config.ghostOAuth')) { - yield this._oauthConfirm(); + return yield this._oauthConfirm(); } else { - yield this._passwordConfirm(); + return yield this._passwordConfirm(); } }).drop(), diff --git a/app/styles/components/modals.css b/app/styles/components/modals.css index 207d174ce..f17b2222c 100644 --- a/app/styles/components/modals.css +++ b/app/styles/components/modals.css @@ -183,8 +183,10 @@ @media (min-width: 901px) { .modal-body .login-form { display: flex; + align-items: center; } .modal-body .login-form .password-wrap { flex: 1; + margin-right: 10px; } }