don't let uses change HS/IS URL in the middle of registration - fixes https://github.com/vector-im/vector-web/issues/1176

This commit is contained in:
Matthew Hodgson 2016-03-16 19:14:28 +00:00
parent 74acc0b564
commit bb918f198b
2 changed files with 3 additions and 1 deletions

View file

@ -255,7 +255,7 @@ module.exports = React.createClass({
<div className="mx_Login_error">{this.state.errorText}</div>
{busySpinner}
<ServerConfig ref="serverConfig"
withToggleButton={true}
withToggleButton={ this.registerLogic.getStep() === "Register.START" }
customHsUrl={this.props.customHsUrl}
customIsUrl={this.props.customIsUrl}
defaultHsUrl={this.props.defaultHsUrl}

View file

@ -151,6 +151,7 @@ module.exports = React.createClass({
</label>
<input className="mx_Login_field" id="hsurl" type="text"
placeholder={this.props.defaultHsUrl}
disabled={!this.props.withToggleButton}
value={this.state.hs_url}
onChange={this.onHomeserverChanged} />
<label className="mx_Login_label mx_ServerConfig_islabel" htmlFor="isurl">
@ -158,6 +159,7 @@ module.exports = React.createClass({
</label>
<input className="mx_Login_field" id="isurl" type="text"
placeholder={this.props.defaultIsUrl}
disabled={!this.props.withToggleButton}
value={this.state.is_url}
onChange={this.onIdentityServerChanged} />
<a className="mx_ServerConfig_help" href="#" onClick={this.showHelpPopup}>