mirror of
https://github.com/flarum/framework.git
synced 2024-12-13 07:03:35 +08:00
Fix broken forgot password form. closes #116
This commit is contained in:
parent
4060d575a8
commit
195a3e42d8
|
@ -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;
|
||||
|
|
|
@ -51,6 +51,8 @@ export default class FormModal extends Component {
|
|||
|
||||
if (errors) {
|
||||
this.$('[name='+errors[0].path+']').select();
|
||||
} else {
|
||||
this.$(':input:first').select();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user