Add new footer text to reset password

This commit is contained in:
J. Ryan Stinnett 2019-02-06 15:46:25 +00:00
parent 5d0798ed24
commit 8c6dc002f3
2 changed files with 34 additions and 38 deletions

View file

@ -226,45 +226,41 @@ module.exports = React.createClass({
errorText = <div className="mx_Login_error">{ err }</div>; errorText = <div className="mx_Login_error">{ err }</div>;
} }
resetPasswordJsx = ( resetPasswordJsx = <div>
<div> <form onSubmit={this.onSubmitForm}>
<p> <div className="mx_AuthBody_fieldRow">
{ _t('To reset your password, enter the email address linked to your account') }: <input className="mx_Login_field" ref="user" type="text"
</p> name="reset_email" // define a name so browser's password autofill gets less confused
<div> value={this.state.email}
<form onSubmit={this.onSubmitForm}> onChange={this.onInputChanged.bind(this, "email")}
<div className="mx_AuthBody_fieldRow"> placeholder={_t('Email')} autoFocus />
<input className="mx_Login_field" ref="user" type="text" </div>
name="reset_email" // define a name so browser's password autofill gets less confused <div className="mx_AuthBody_fieldRow">
value={this.state.email} <input className="mx_Login_field" ref="pass" type="password"
onChange={this.onInputChanged.bind(this, "email")} name="reset_password"
placeholder={_t('Email')} autoFocus /> value={this.state.password}
</div> onChange={this.onInputChanged.bind(this, "password")}
<div className="mx_AuthBody_fieldRow"> placeholder={_t('Password')} />
<input className="mx_Login_field" ref="pass" type="password" <input className="mx_Login_field" ref="pass" type="password"
name="reset_password" name="reset_password_confirm"
value={this.state.password} value={this.state.password2}
onChange={this.onInputChanged.bind(this, "password")} onChange={this.onInputChanged.bind(this, "password2")}
placeholder={_t('Password')} /> placeholder={_t('Confirm')} />
<input className="mx_Login_field" ref="pass" type="password" </div>
name="reset_password_confirm" <span>{_t(
value={this.state.password2} 'A verification email will be sent to your inbox to confirm ' +
onChange={this.onInputChanged.bind(this, "password2")} 'setting your new password.',
placeholder={_t('Confirm')} /> )}</span>
</div> <input className="mx_Login_submit" type="submit" value={_t('Send Reset Email')} />
<input className="mx_Login_submit" type="submit" value={_t('Send Reset Email')} /> </form>
</form> {serverConfigSection}
{ serverConfigSection } {errorText}
{ errorText } <a className="mx_AuthBody_changeFlow" onClick={this.onLoginClick} href="#">
<a className="mx_AuthBody_changeFlow" onClick={this.onLoginClick} href="#"> {_t('Sign in instead')}
{ _t('Sign in instead') } </a>
</a> </div>;
</div>
</div>
);
} }
return ( return (
<AuthPage> <AuthPage>
<AuthHeader /> <AuthHeader />

View file

@ -1379,7 +1379,7 @@
"Your password has been reset": "Your password has been reset", "Your password has been reset": "Your password has been reset",
"You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device", "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device": "You have been logged out of all devices and will no longer receive push notifications. To re-enable notifications, sign in again on each device",
"Return to login screen": "Return to login screen", "Return to login screen": "Return to login screen",
"To reset your password, enter the email address linked to your account": "To reset your password, enter the email address linked to your account", "A verification email will be sent to your inbox to confirm setting your new password.": "A verification email will be sent to your inbox to confirm setting your new password.",
"Send Reset Email": "Send Reset Email", "Send Reset Email": "Send Reset Email",
"Sign in instead": "Sign in instead", "Sign in instead": "Sign in instead",
"Set a new password": "Set a new password", "Set a new password": "Set a new password",