diff options
author | Corey Hulen <corey@hulen.com> | 2015-09-23 14:04:08 -0700 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2015-09-23 14:04:08 -0700 |
commit | d792745f54463772472bec23b0caaae703eaddb3 (patch) | |
tree | d98c966e0f273c5a6052e3c154bd7d75d091aa27 /web/react/components/team_signup_choose_auth.jsx | |
parent | 0170cfe604e6cfb430be0b6181243ca85a9ab27b (diff) | |
parent | ccf2e6e4e74fc249a094c2c27de675644f1065cb (diff) | |
download | chat-d792745f54463772472bec23b0caaae703eaddb3.tar.gz chat-d792745f54463772472bec23b0caaae703eaddb3.tar.bz2 chat-d792745f54463772472bec23b0caaae703eaddb3.zip |
Merge pull request #752 from mattermost/PLT-11-email
PLT-11 Cleaned up config file and added ability to makes changes from the admin console.
Diffstat (limited to 'web/react/components/team_signup_choose_auth.jsx')
-rw-r--r-- | web/react/components/team_signup_choose_auth.jsx | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/web/react/components/team_signup_choose_auth.jsx b/web/react/components/team_signup_choose_auth.jsx index d3107c5c7..b8264b887 100644 --- a/web/react/components/team_signup_choose_auth.jsx +++ b/web/react/components/team_signup_choose_auth.jsx @@ -1,8 +1,6 @@ // Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. // See License.txt for license information. -var Constants = require('../utils/constants.jsx'); - export default class ChooseAuthPage extends React.Component { constructor(props) { super(props); @@ -10,7 +8,7 @@ export default class ChooseAuthPage extends React.Component { } render() { var buttons = []; - if (this.props.services.indexOf(Constants.GITLAB_SERVICE) !== -1) { + if (global.window.config.EnableSignUpWithGitLab === 'true') { buttons.push( <a className='btn btn-custom-login gitlab btn-full' @@ -18,17 +16,17 @@ export default class ChooseAuthPage extends React.Component { onClick={ function clickGit(e) { e.preventDefault(); - this.props.updatePage('service', Constants.GITLAB_SERVICE); + this.props.updatePage('gitlab'); }.bind(this) } > <span className='icon' /> - <span>Create new team with GitLab Account</span> + <span>{'Create new team with GitLab Account'}</span> </a> ); } - if (this.props.services.indexOf(Constants.EMAIL_SERVICE) !== -1) { + if (global.window.config.EnableSignUpWithEmail === 'true') { buttons.push( <a className='btn btn-custom-login email btn-full' @@ -36,18 +34,18 @@ export default class ChooseAuthPage extends React.Component { onClick={ function clickEmail(e) { e.preventDefault(); - this.props.updatePage('email', ''); + this.props.updatePage('email'); }.bind(this) } > <span className='fa fa-envelope' /> - <span>Create new team with email address</span> + <span>{'Create new team with email address'}</span> </a> ); } if (buttons.length === 0) { - buttons = <span>No sign-up methods configured, please contact your system administrator.</span>; + buttons = <span>{'No sign-up methods configured, please contact your system administrator.'}</span>; } return ( @@ -61,10 +59,6 @@ export default class ChooseAuthPage extends React.Component { } } -ChooseAuthPage.defaultProps = { - services: [] -}; ChooseAuthPage.propTypes = { - services: React.PropTypes.array, updatePage: React.PropTypes.func }; |