summaryrefslogtreecommitdiffstats
path: root/webapp/components/team_signup_choose_auth.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-03-16 18:16:11 -0400
committerChristopher Speller <crspeller@gmail.com>2016-03-16 18:16:11 -0400
commit4a4859351a4cd277f94d3faa804daaad0733b270 (patch)
tree4e7f83d3e2564b9b89d669e9f7905ff11768b11a /webapp/components/team_signup_choose_auth.jsx
parent29fe6a3d13c9c7aa490fffebbe5d1b5fdf1e3090 (diff)
parent12896bd23eeba79884245c1c29fdc568cf21a7fa (diff)
downloadchat-4a4859351a4cd277f94d3faa804daaad0733b270.tar.gz
chat-4a4859351a4cd277f94d3faa804daaad0733b270.tar.bz2
chat-4a4859351a4cd277f94d3faa804daaad0733b270.zip
Merge pull request #2453 from mattermost/plt-2340
PLT-2340 Converting to Webpack. Stage 1.
Diffstat (limited to 'webapp/components/team_signup_choose_auth.jsx')
-rw-r--r--webapp/components/team_signup_choose_auth.jsx140
1 files changed, 140 insertions, 0 deletions
diff --git a/webapp/components/team_signup_choose_auth.jsx b/webapp/components/team_signup_choose_auth.jsx
new file mode 100644
index 000000000..d26e8a9ac
--- /dev/null
+++ b/webapp/components/team_signup_choose_auth.jsx
@@ -0,0 +1,140 @@
+// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
+import {FormattedMessage} from 'react-intl';
+
+import React from 'react';
+
+export default class ChooseAuthPage extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {};
+ }
+ render() {
+ var buttons = [];
+ if (global.window.mm_config.EnableSignUpWithGitLab === 'true') {
+ buttons.push(
+ <a
+ className='btn btn-custom-login gitlab btn-full'
+ key='gitlab'
+ href='#'
+ onClick={
+ function clickGit(e) {
+ e.preventDefault();
+ this.props.updatePage('gitlab');
+ }.bind(this)
+ }
+ >
+ <span className='icon'/>
+ <span>
+ <FormattedMessage
+ id='choose_auth_page.gitlabCreate'
+ defaultMessage='Create new team with GitLab Account'
+ />
+ </span>
+ </a>
+ );
+ }
+
+ if (global.window.mm_config.EnableSignUpWithGoogle === 'true') {
+ buttons.push(
+ <a
+ className='btn btn-custom-login google btn-full'
+ key='google'
+ href='#'
+ onClick={
+ (e) => {
+ e.preventDefault();
+ this.props.updatePage('google');
+ }
+ }
+ >
+ <span className='icon'/>
+ <span>
+ <FormattedMessage
+ id='choose_auth_page.googleCreate'
+ defaultMessage='Create new team with Google Apps Account'
+ />
+ </span>
+ </a>
+ );
+ }
+
+ if (global.window.mm_config.EnableLdap === 'true') {
+ buttons.push(
+ <a
+ className='btn btn-custom-login ldap btn-full'
+ key='ldap'
+ href='#'
+ onClick={
+ (e) => {
+ e.preventDefault();
+ this.props.updatePage('ldap');
+ }
+ }
+ >
+ <span className='icon'/>
+ <span>
+ <FormattedMessage
+ id='choose_auth_page.ldapCreate'
+ defaultMessage='Create new team with LDAP Account'
+ />
+ </span>
+ </a>
+ );
+ }
+
+ if (global.window.mm_config.EnableSignUpWithEmail === 'true') {
+ buttons.push(
+ <a
+ className='btn btn-custom-login email btn-full'
+ key='email'
+ href='#'
+ onClick={
+ function clickEmail(e) {
+ e.preventDefault();
+ this.props.updatePage('email');
+ }.bind(this)
+ }
+ >
+ <span className='fa fa-envelope'/>
+ <span>
+ <FormattedMessage
+ id='choose_auth_page.emailCreate'
+ defaultMessage='Create new team with email address'
+ />
+ </span>
+ </a>
+ );
+ }
+
+ if (buttons.length === 0) {
+ buttons = (
+ <span>
+ <FormattedMessage
+ id='choose_auth_page.noSignup'
+ defaultMessage='No sign-up methods configured, please contact your system administrator.'
+ />
+ </span>
+ );
+ }
+
+ return (
+ <div>
+ {buttons}
+ <div className='form-group margin--extra-2x'>
+ <span><a href='/find_team'>
+ <FormattedMessage
+ id='choose_auth_page.find'
+ defaultMessage='Find my teams'
+ />
+ </a></span>
+ </div>
+ </div>
+ );
+ }
+}
+
+ChooseAuthPage.propTypes = {
+ updatePage: React.PropTypes.func
+};