mirror of
https://github.com/flarum/core.git
synced 2025-07-26 03:01:22 +02:00
Fix broken forgot password form. closes #116
This commit is contained in:
@@ -49,7 +49,7 @@ export default class ForgotPasswordModal extends FormModal {
|
|||||||
background: true,
|
background: true,
|
||||||
extract: xhr => {
|
extract: xhr => {
|
||||||
if (xhr.status === 404) {
|
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;
|
throw new Error;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@@ -51,6 +51,8 @@ export default class FormModal extends Component {
|
|||||||
|
|
||||||
if (errors) {
|
if (errors) {
|
||||||
this.$('[name='+errors[0].path+']').select();
|
this.$('[name='+errors[0].path+']').select();
|
||||||
|
} else {
|
||||||
|
this.$(':input:first').select();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user