You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-19 20:23:18 +03:00
Allow submit on forgot password page
This commit is contained in:
@ -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="#">
|
||||||
|
Reference in New Issue
Block a user