Allow submit on forgot password page
This commit is contained in:
parent
d59ad605a6
commit
120123bcb1
1 changed files with 5 additions and 3 deletions
|
@ -82,8 +82,10 @@ module.exports = React.createClass({
|
||||||
serverConfig.isUrl,
|
serverConfig.isUrl,
|
||||||
);
|
);
|
||||||
this.setState({serverIsAlive: true});
|
this.setState({serverIsAlive: true});
|
||||||
|
return true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.setState(AutoDiscoveryUtils.authComponentStateForError(e));
|
this.setState(AutoDiscoveryUtils.authComponentStateForError(e));
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -117,10 +119,11 @@ module.exports = React.createClass({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
onSubmitForm: function(ev) {
|
onSubmitForm: async function(ev) {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
|
|
||||||
if (!this.state.serverIsAlive) return;
|
const shouldBlockSubmit = await this._checkServerLiveliness(this.props.serverConfig);
|
||||||
|
if (shouldBlockSubmit) return;
|
||||||
|
|
||||||
if (!this.state.email) {
|
if (!this.state.email) {
|
||||||
this.showErrorDialog(_t('The email address linked to your account must be entered.'));
|
this.showErrorDialog(_t('The email address linked to your account must be entered.'));
|
||||||
|
@ -293,7 +296,6 @@ module.exports = React.createClass({
|
||||||
className="mx_Login_submit"
|
className="mx_Login_submit"
|
||||||
type="submit"
|
type="submit"
|
||||||
value={_t('Send Reset Email')}
|
value={_t('Send Reset Email')}
|
||||||
disabled={!this.state.serverIsAlive}
|
|
||||||
/>
|
/>
|
||||||
</form>
|
</form>
|
||||||
<a className="mx_AuthBody_changeFlow" onClick={this.onLoginClick} href="#">
|
<a className="mx_AuthBody_changeFlow" onClick={this.onLoginClick} href="#">
|
||||||
|
|
Loading…
Reference in a new issue