diff options
author | =Corey Hulen <corey@hulen.com> | 2016-01-28 11:59:38 -0500 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2016-01-28 11:59:38 -0500 |
commit | e37b2c62f3148ec26f9eddd57d208a640715e68e (patch) | |
tree | 27e9484181d1b20ef4e78513f66866d4b82ec900 /web/react/components/claim/email_to_sso.jsx | |
parent | 2138b46f6cdab5fca49680c2e1994703ab71b1c3 (diff) | |
parent | db37897538f134b29784453797510c20e1e9303c (diff) | |
download | chat-e37b2c62f3148ec26f9eddd57d208a640715e68e.tar.gz chat-e37b2c62f3148ec26f9eddd57d208a640715e68e.tar.bz2 chat-e37b2c62f3148ec26f9eddd57d208a640715e68e.zip |
Merge branch 'master' into PLT-1765
Diffstat (limited to 'web/react/components/claim/email_to_sso.jsx')
-rw-r--r-- | web/react/components/claim/email_to_sso.jsx | 61 |
1 files changed, 54 insertions, 7 deletions
diff --git a/web/react/components/claim/email_to_sso.jsx b/web/react/components/claim/email_to_sso.jsx index ac0cf876b..3d4b9e91f 100644 --- a/web/react/components/claim/email_to_sso.jsx +++ b/web/react/components/claim/email_to_sso.jsx @@ -4,7 +4,20 @@ import * as Utils from '../../utils/utils.jsx'; import * as Client from '../../utils/client.jsx'; -export default class EmailToSSO extends React.Component { +import {intlShape, injectIntl, defineMessages, FormattedMessage} from 'mm-intl'; + +const holders = defineMessages({ + pwdError: { + id: 'claim.email_to_sso.pwdError', + defaultMessage: 'Please enter your password.' + }, + pwd: { + id: 'claim.email_to_sso.pwd', + defaultMessage: 'Password' + } +}); + +class EmailToSSO extends React.Component { constructor(props) { super(props); @@ -18,7 +31,7 @@ export default class EmailToSSO extends React.Component { var password = ReactDOM.findDOMNode(this.refs.password).value.trim(); if (!password) { - state.error = 'Please enter your password.'; + state.error = this.props.intl.formatMessage(holders.pwdError); this.setState(state); return; } @@ -59,17 +72,42 @@ export default class EmailToSSO extends React.Component { return ( <div className='col-sm-12'> <div className='signup-team__container'> - <h3>{'Switch Email/Password Account to ' + uiType}</h3> + <h3> + <FormattedMessage + id='claim.email_to_sso.title' + defaultMessage='Switch Email/Password Account to {uiType}' + values={{ + uiType: uiType + }} + /> + </h3> <form onSubmit={this.submit}> - <p>{'Upon claiming your account, you will only be able to login with ' + Utils.toTitleCase(this.props.type) + ' SSO.'}</p> - <p>{'Enter the password for your ' + this.props.teamDisplayName + ' ' + global.window.mm_config.SiteName + ' account.'}</p> + <p> + <FormattedMessage + id='claim.email_to_sso.ssoType' + defaultMessage='Upon claiming your account, you will only be able to login with {type} SSO' + values={{ + type: Utils.toTitleCase(this.props.type) + }} + /> + </p> + <p> + <FormattedMessage + id='claim.email_to_sso.enterPwd' + defaultMessage='Enter the password for your {team} {site} account' + values={{ + team: this.props.teamDisplayName, + site: global.window.mm_config.SiteName + }} + /> + </p> <div className={formClass}> <input type='password' className='form-control' name='password' ref='password' - placeholder='Password' + placeholder={this.props.intl.formatMessage(holders.pwd)} spellCheck='false' /> </div> @@ -78,7 +116,13 @@ export default class EmailToSSO extends React.Component { type='submit' className='btn btn-primary' > - {'Switch account to ' + uiType} + <FormattedMessage + id='claim.email_to_sso.switchTo' + defaultMessage='Switch account to {uiType}' + values={{ + uiType: uiType + }} + /> </button> </form> </div> @@ -90,8 +134,11 @@ export default class EmailToSSO extends React.Component { EmailToSSO.defaultProps = { }; EmailToSSO.propTypes = { + intl: intlShape.isRequired, type: React.PropTypes.string.isRequired, email: React.PropTypes.string.isRequired, teamName: React.PropTypes.string.isRequired, teamDisplayName: React.PropTypes.string.isRequired }; + +export default injectIntl(EmailToSSO);
\ No newline at end of file |