Merge pull request #2775 from matrix-org/travis/auth-escape-hatch
Provide an escape from the registration processpull/21833/head
commit
09600dcabd
|
@ -366,6 +366,17 @@ module.exports = React.createClass({
|
||||||
this.props.onLoginClick();
|
this.props.onLoginClick();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onGoToFormClicked(ev) {
|
||||||
|
ev.preventDefault();
|
||||||
|
ev.stopPropagation();
|
||||||
|
this._replaceClient();
|
||||||
|
this.setState({
|
||||||
|
busy: false,
|
||||||
|
doingUIAuth: false,
|
||||||
|
phase: PHASE_REGISTRATION,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
onServerDetailsNextPhaseClick(ev) {
|
onServerDetailsNextPhaseClick(ev) {
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
this.setState({
|
this.setState({
|
||||||
|
@ -549,6 +560,14 @@ module.exports = React.createClass({
|
||||||
{ _t('Sign in instead') }
|
{ _t('Sign in instead') }
|
||||||
</a>;
|
</a>;
|
||||||
|
|
||||||
|
// Only show the 'go back' button if you're not looking at the form
|
||||||
|
let goBack;
|
||||||
|
if ((PHASES_ENABLED && this.state.phase !== PHASE_REGISTRATION) || this.state.doingUIAuth) {
|
||||||
|
goBack = <a className="mx_AuthBody_changeFlow" onClick={this.onGoToFormClicked} href="#">
|
||||||
|
{ _t('Go back') }
|
||||||
|
</a>;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AuthPage>
|
<AuthPage>
|
||||||
<AuthHeader />
|
<AuthHeader />
|
||||||
|
@ -557,6 +576,7 @@ module.exports = React.createClass({
|
||||||
{ errorText }
|
{ errorText }
|
||||||
{ this.renderServerComponent() }
|
{ this.renderServerComponent() }
|
||||||
{ this.renderRegisterComponent() }
|
{ this.renderRegisterComponent() }
|
||||||
|
{ goBack }
|
||||||
{ signIn }
|
{ signIn }
|
||||||
</AuthBody>
|
</AuthBody>
|
||||||
</AuthPage>
|
</AuthPage>
|
||||||
|
|
Loading…
Reference in New Issue