From 12896bd23eeba79884245c1c29fdc568cf21a7fa Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Mon, 14 Mar 2016 08:50:46 -0400 Subject: Converting to Webpack. Stage 1. --- web/react/components/signup_team.jsx | 205 ----------------------------------- 1 file changed, 205 deletions(-) delete mode 100644 web/react/components/signup_team.jsx (limited to 'web/react/components/signup_team.jsx') diff --git a/web/react/components/signup_team.jsx b/web/react/components/signup_team.jsx deleted file mode 100644 index 2adf8d111..000000000 --- a/web/react/components/signup_team.jsx +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. -// See License.txt for license information. - -import ChoosePage from './team_signup_choose_auth.jsx'; -import EmailSignUpPage from './team_signup_with_email.jsx'; -import SSOSignupPage from './team_signup_with_sso.jsx'; -import LdapSignUpPage from './team_signup_with_ldap.jsx'; -import Constants from '../utils/constants.jsx'; -import TeamStore from '../stores/team_store.jsx'; -import * as AsyncClient from '../utils/async_client.jsx'; - -import {FormattedMessage} from 'mm-intl'; - -export default class TeamSignUp extends React.Component { - constructor(props) { - super(props); - - this.updatePage = this.updatePage.bind(this); - this.onTeamUpdate = this.onTeamUpdate.bind(this); - - var count = 0; - - if (global.window.mm_config.EnableSignUpWithEmail === 'true') { - count = count + 1; - } - - if (global.window.mm_config.EnableSignUpWithGitLab === 'true') { - count = count + 1; - } - - if (global.window.mm_config.EnableLdap === 'true') { - count = count + 1; - } - - if (count > 1) { - this.state = {page: 'choose'}; - } else if (global.window.mm_config.EnableSignUpWithEmail === 'true') { - this.state = {page: 'email'}; - } else if (global.window.mm_config.EnableSignUpWithGitLab === 'true') { - this.state = {page: 'gitlab'}; - } else if (global.window.mm_config.EnableLdap === 'true') { - this.state = {page: 'ldap'}; - } else { - this.state = {page: 'none'}; - } - } - - updatePage(page) { - this.setState({page}); - } - - componentWillMount() { - if (global.window.mm_config.EnableTeamListing === 'true') { - AsyncClient.getAllTeams(); - this.onTeamUpdate(); - } - } - - componentDidMount() { - TeamStore.addChangeListener(this.onTeamUpdate); - } - - componentWillUnmount() { - TeamStore.removeChangeListener(this.onTeamUpdate); - } - - onTeamUpdate() { - this.setState({ - teams: TeamStore.getAll() - }); - } - - render() { - let teamListing = null; - - if (global.window.mm_config.EnableTeamListing === 'true') { - if (this.state.teams == null) { - teamListing = (
); - } else if (this.state.teams.length === 0) { - if (global.window.mm_config.EnableTeamCreation !== 'true') { - teamListing = ( -
- -
- ); - } - } else { - teamListing = ( -
-

- -

-
- { - Object.values(this.state.teams).map((team) => { - if (team.allow_team_listing) { - return ( -
- - {team.display_name} - -
- ); - } - return null; - }) - } -
-

- -

-
- ); - } - } - - let signupMethod = null; - - if (global.window.mm_config.EnableTeamCreation !== 'true') { - if (teamListing == null) { - signupMethod = ( - - ); - } - } else if (this.state.page === 'choose') { - signupMethod = ( - - ); - } else if (this.state.page === 'email') { - signupMethod = ( - - ); - } else if (this.state.page === 'ldap') { - return ( -
- {teamListing} - -
- ); - } else if (this.state.page === 'gitlab') { - signupMethod = ( - - ); - } else if (this.state.page === 'google') { - signupMethod = ( - - ); - } else if (this.state.page === 'none') { - signupMethod = ( - - ); - } - - return ( -
-
- -

{global.window.mm_config.SiteName}

-

- -

-
- {teamListing} - {signupMethod} -
-
-
- ); - } -} - -TeamSignUp.propTypes = { -}; - -- cgit v1.2.3-1-g7c22