diff --git a/src/components/structures/auth/ForgotPassword.js b/src/components/structures/auth/ForgotPassword.js index be9c4321b6..e74c28e04d 100644 --- a/src/components/structures/auth/ForgotPassword.js +++ b/src/components/structures/auth/ForgotPassword.js @@ -174,6 +174,21 @@ module.exports = React.createClass({ this.setState(newState); }, + onServerDetailsNextPhaseClick(ev) { + ev.stopPropagation(); + this.setState({ + phase: PHASE_FORGOT, + }); + }, + + onEditServerDetailsClick(ev) { + ev.preventDefault(); + ev.stopPropagation(); + this.setState({ + phase: PHASE_SERVER_DETAILS, + }); + }, + onLoginClick: function(ev) { ev.preventDefault(); ev.stopPropagation(); @@ -189,25 +204,30 @@ module.exports = React.createClass({ }, renderServerDetails() { - return null; + const ServerConfig = sdk.getComponent("auth.ServerConfig"); + const AccessibleButton = sdk.getComponent("elements.AccessibleButton"); + + if (SdkConfig.get()['disable_custom_urls']) { + return null; + } + + return
+ + + {_t("Next")} + +
; }, renderForgot() { - const ServerConfig = sdk.getComponent("auth.ServerConfig"); - - let serverConfigSection; - if (!SdkConfig.get()['disable_custom_urls']) { - serverConfigSection = ( - - ); - } - let errorText = null; const err = this.state.errorText || this.props.defaultServerDiscoveryError; if (err) { @@ -224,9 +244,20 @@ module.exports = React.createClass({ // ignore } + // If custom URLs are allowed, wire up the server details edit link. + let editLink = null; + if (!SdkConfig.get()['disable_custom_urls']) { + editLink = + {_t('Change')} + ; + } + return

{yourMatrixAccountText} + {editLink}

{errorText}
@@ -255,7 +286,6 @@ module.exports = React.createClass({ )}
- {serverConfigSection} {_t('Sign in instead')}