summaryrefslogtreecommitdiffstats
path: root/web/react/components/claim/email_to_sso.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components/claim/email_to_sso.jsx')
-rw-r--r--web/react/components/claim/email_to_sso.jsx61
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