// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. import WelcomePage from './team_signup_welcome_page.jsx'; import TeamDisplayNamePage from './team_signup_display_name_page.jsx'; import TeamURLPage from './team_signup_url_page.jsx'; import SendInivtesPage from './team_signup_send_invites_page.jsx'; import UsernamePage from './team_signup_username_page.jsx'; import PasswordPage from './team_signup_password_page.jsx'; import BrowserStore from '../stores/browser_store.jsx'; import {FormattedMessage} from 'mm-intl'; export default class SignupTeamComplete extends React.Component { constructor(props) { super(props); this.updateParent = this.updateParent.bind(this); var initialState = BrowserStore.getGlobalItem(props.hash); if (!initialState) { initialState = {}; initialState.wizard = 'welcome'; initialState.team = {}; initialState.team.email = this.props.email; initialState.team.allowed_domains = ''; initialState.invites = []; initialState.invites.push(''); initialState.invites.push(''); initialState.invites.push(''); initialState.user = {}; initialState.hash = this.props.hash; initialState.data = this.props.data; } this.state = initialState; } updateParent(state, skipSet) { BrowserStore.setGlobalItem(this.props.hash, state); if (!skipSet) { this.setState(state); } } render() { if (this.state.wizard === 'welcome') { return ( ); } if (this.state.wizard === 'team_display_name') { return ( ); } if (this.state.wizard === 'team_url') { return ( ); } if (this.state.wizard === 'send_invites') { return ( ); } if (this.state.wizard === 'username') { return ( ); } if (this.state.wizard === 'password') { return ( ); } return (
); } } SignupTeamComplete.defaultProps = { hash: '', email: '', data: '' }; SignupTeamComplete.propTypes = { hash: React.PropTypes.string, email: React.PropTypes.string, data: React.PropTypes.string };