Update email help text
Fixes https://github.com/vector-im/riot-web/issues/10674
This commit is contained in:
parent
86fcaa2af0
commit
c749b6355f
2 changed files with 30 additions and 11 deletions
|
@ -444,6 +444,15 @@ module.exports = React.createClass({
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_showPhoneNumber() {
|
||||||
|
const threePidLogin = !SdkConfig.get().disable_3pid_login;
|
||||||
|
const haveIs = Boolean(this.props.serverConfig.isUrl);
|
||||||
|
if (!threePidLogin || !haveIs || !this._authStepIsUsed('m.login.msisdn')) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
renderEmail() {
|
renderEmail() {
|
||||||
if (!this._showEmail()) {
|
if (!this._showEmail()) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -490,9 +499,7 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
renderPhoneNumber() {
|
renderPhoneNumber() {
|
||||||
const threePidLogin = !SdkConfig.get().disable_3pid_login;
|
if (!this._showPhoneNumber()) {
|
||||||
const haveIs = Boolean(this.props.serverConfig.isUrl);
|
|
||||||
if (!threePidLogin || !haveIs || !this._authStepIsUsed('m.login.msisdn')) {
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
const CountryDropdown = sdk.getComponent('views.auth.CountryDropdown');
|
const CountryDropdown = sdk.getComponent('views.auth.CountryDropdown');
|
||||||
|
@ -564,11 +571,24 @@ module.exports = React.createClass({
|
||||||
<input className="mx_Login_submit" type="submit" value={_t("Register")} disabled={!this.props.canSubmit} />
|
<input className="mx_Login_submit" type="submit" value={_t("Register")} disabled={!this.props.canSubmit} />
|
||||||
);
|
);
|
||||||
|
|
||||||
const emailHelperText = this._showEmail() ? <div>
|
let emailHelperText = null;
|
||||||
{_t("Use an email address to recover your account.") + " "}
|
if (this._showEmail()) {
|
||||||
{_t("Other users can invite you to rooms using your contact details.")}
|
if (this._showPhoneNumber()) {
|
||||||
</div> : null;
|
emailHelperText = <div>
|
||||||
|
{_t(
|
||||||
|
"Set an email for account recovery. " +
|
||||||
|
"Use email or phone to optionally be discoverable by existing contacts.",
|
||||||
|
)}
|
||||||
|
</div>;
|
||||||
|
} else {
|
||||||
|
emailHelperText = <div>
|
||||||
|
{_t(
|
||||||
|
"Set an email for account recovery. " +
|
||||||
|
"Use email to optionally be discoverable by existing contacts.",
|
||||||
|
)}
|
||||||
|
</div>;
|
||||||
|
}
|
||||||
|
}
|
||||||
const haveIs = Boolean(this.props.serverConfig.isUrl);
|
const haveIs = Boolean(this.props.serverConfig.isUrl);
|
||||||
const noIsText = haveIs ? null : <div>
|
const noIsText = haveIs ? null : <div>
|
||||||
{_t(
|
{_t(
|
||||||
|
|
|
@ -1461,9 +1461,8 @@
|
||||||
"Phone (optional)": "Phone (optional)",
|
"Phone (optional)": "Phone (optional)",
|
||||||
"Create your Matrix account on %(serverName)s": "Create your Matrix account on %(serverName)s",
|
"Create your Matrix account on %(serverName)s": "Create your Matrix account on %(serverName)s",
|
||||||
"Create your Matrix account on <underlinedServerName />": "Create your Matrix account on <underlinedServerName />",
|
"Create your Matrix account on <underlinedServerName />": "Create your Matrix account on <underlinedServerName />",
|
||||||
"Use an email address to recover your account.": "Use an email address to recover your account.",
|
"Set an email for account recovery. Use email or phone to optionally be discoverable by existing contacts.": "Set an email for account recovery. Use email or phone to optionally be discoverable by existing contacts.",
|
||||||
"Other users can invite you to rooms using your contact details.": "Other users can invite you to rooms using your contact details.",
|
"Set an email for account recovery. Use email to optionally be discoverable by existing contacts.": "Set an email for account recovery. Use email to optionally be discoverable by existing contacts.",
|
||||||
"No Identity Server is configured: no email addreses can be added. You will be unable to reset your password.": "No Identity Server is configured: no email addreses can be added. You will be unable to reset your password.",
|
|
||||||
"Other servers": "Other servers",
|
"Other servers": "Other servers",
|
||||||
"Enter custom server URLs <a>What does this mean?</a>": "Enter custom server URLs <a>What does this mean?</a>",
|
"Enter custom server URLs <a>What does this mean?</a>": "Enter custom server URLs <a>What does this mean?</a>",
|
||||||
"Homeserver URL": "Homeserver URL",
|
"Homeserver URL": "Homeserver URL",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue