From ed9a2da83b3b77e7dd0314eaa92082ac8a2a9a9c Mon Sep 17 00:00:00 2001
From: =Corey Hulen <corey@hulen.com>
Date: Mon, 21 Sep 2015 15:11:56 -0700
Subject: Adding email to admin console

---
 web/react/components/team_signup_choose_auth.jsx | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

(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
index d3107c5c7..cfd45edb3 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.AllowSignUpWithGitLab) {
             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.AllowSignUpWithEmail) {
             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
 };
-- 
cgit v1.2.3-1-g7c22


From e863096358dd64ecf2de6efeec3db132cdc8d6b9 Mon Sep 17 00:00:00 2001
From: =Corey Hulen <corey@hulen.com>
Date: Mon, 21 Sep 2015 15:34:09 -0700
Subject: Fixing broken signup pages

---
 web/react/components/team_signup_choose_auth.jsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(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
index cfd45edb3..4aeae8f08 100644
--- a/web/react/components/team_signup_choose_auth.jsx
+++ b/web/react/components/team_signup_choose_auth.jsx
@@ -8,7 +8,7 @@ export default class ChooseAuthPage extends React.Component {
     }
     render() {
         var buttons = [];
-        if (global.window.config.AllowSignUpWithGitLab) {
+        if (global.window.config.AllowSignUpWithGitLab === 'true') {
             buttons.push(
                     <a
                         className='btn btn-custom-login gitlab btn-full'
@@ -26,7 +26,7 @@ export default class ChooseAuthPage extends React.Component {
             );
         }
 
-        if (global.window.config.AllowSignUpWithEmail) {
+        if (global.window.config.AllowSignUpWithEmail === 'true') {
             buttons.push(
                     <a
                         className='btn btn-custom-login email btn-full'
-- 
cgit v1.2.3-1-g7c22


From 88e5a71e8c93b495cedaa07931a4f8052d9f12ed Mon Sep 17 00:00:00 2001
From: =Corey Hulen <corey@hulen.com>
Date: Tue, 22 Sep 2015 12:12:50 -0700
Subject: Adding service settings to admin console

---
 web/react/components/team_signup_choose_auth.jsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(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
index 4aeae8f08..b8264b887 100644
--- a/web/react/components/team_signup_choose_auth.jsx
+++ b/web/react/components/team_signup_choose_auth.jsx
@@ -8,7 +8,7 @@ export default class ChooseAuthPage extends React.Component {
     }
     render() {
         var buttons = [];
-        if (global.window.config.AllowSignUpWithGitLab === 'true') {
+        if (global.window.config.EnableSignUpWithGitLab === 'true') {
             buttons.push(
                     <a
                         className='btn btn-custom-login gitlab btn-full'
@@ -26,7 +26,7 @@ export default class ChooseAuthPage extends React.Component {
             );
         }
 
-        if (global.window.config.AllowSignUpWithEmail === 'true') {
+        if (global.window.config.EnableSignUpWithEmail === 'true') {
             buttons.push(
                     <a
                         className='btn btn-custom-login email btn-full'
-- 
cgit v1.2.3-1-g7c22

