From f5fec3a157e6c9146a0c4e28dd5f70e6c066affd Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Fri, 28 Aug 2015 08:37:55 -0400 Subject: Added the ability to create a team with SSO services and added the ability to turn off email sign up. --- web/react/components/team_signup_choose_auth.jsx | 88 ++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 web/react/components/team_signup_choose_auth.jsx (limited to 'web/react/components/team_signup_choose_auth.jsx') diff --git a/web/react/components/team_signup_choose_auth.jsx b/web/react/components/team_signup_choose_auth.jsx new file mode 100644 index 000000000..2d35785c2 --- /dev/null +++ b/web/react/components/team_signup_choose_auth.jsx @@ -0,0 +1,88 @@ +// 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); + this.state = {}; + } + render() { + var buttons = []; + if (this.props.services.indexOf(Constants.GITLAB_SERVICE) !== -1) { + buttons.push( + + + Create new {strings.Team} with GitLab Account + + ); + } + + if (this.props.services.indexOf(Constants.GOOGLE_SERVICE) !== -1) { + buttons.push( + + + Create new {strings.Team} with Google Apps Account + + ); + } + + if (this.props.services.indexOf(Constants.EMAIL_SERVICE) !== -1) { + buttons.push( + + + Create new {strings.Team} with email address + + ); + } + + if (buttons.length === 0) { + buttons = No sign-up methods configured, please contact your system administrator.; + } + + return ( +
+ {buttons} +
+ {'Find my ' + strings.Team} +
+
+ ); + } +} + +ChooseAuthPage.defaultProps = { + services: [] +}; +ChooseAuthPage.propTypes = { + services: React.PropTypes.array, + updatePage: React.PropTypes.func +}; -- cgit v1.2.3-1-g7c22