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/signup_team.jsx | 48 ++++++++++++++++--------------------
 1 file changed, 21 insertions(+), 27 deletions(-)

(limited to 'web/react/components/signup_team.jsx')

diff --git a/web/react/components/signup_team.jsx b/web/react/components/signup_team.jsx
index bf08e6508..91d79b919 100644
--- a/web/react/components/signup_team.jsx
+++ b/web/react/components/signup_team.jsx
@@ -4,7 +4,7 @@
 const ChoosePage = require('./team_signup_choose_auth.jsx');
 const EmailSignUpPage = require('./team_signup_with_email.jsx');
 const SSOSignupPage = require('./team_signup_with_sso.jsx');
-const Constants = require('../utils/constants.jsx');
+var Constants = require('../utils/constants.jsx');
 
 export default class TeamSignUp extends React.Component {
     constructor(props) {
@@ -12,38 +12,32 @@ export default class TeamSignUp extends React.Component {
 
         this.updatePage = this.updatePage.bind(this);
 
-        if (props.services.length === 1) {
-            if (props.services[0] === Constants.EMAIL_SERVICE) {
-                this.state = {page: 'email', service: ''};
-            } else {
-                this.state = {page: 'service', service: props.services[0]};
-            }
-        } else {
-            this.state = {page: 'choose', service: ''};
+        if (global.window.config.AllowSignUpWithEmail && global.window.config.AllowSignUpWithGitLab) {
+            this.state = {page: 'choose'};
+        } else if (global.window.config.AllowSignUpWithEmail) {
+            this.state = {page: 'email'};
+        } else if (global.window.config.AllowSignUpWithGitLab) {
+            this.state = {page: 'gitlab'};
         }
     }
-    updatePage(page, service) {
-        this.setState({page: page, service: service});
+
+    updatePage(page) {
+        this.setState({page});
     }
+
     render() {
+        if (this.state.page === 'choose') {
+            return (
+                <ChoosePage
+                    updatePage={this.updatePage}
+                />
+            );
+        }
+
         if (this.state.page === 'email') {
             return <EmailSignUpPage />;
-        } else if (this.state.page === 'service' && this.state.service !== '') {
-            return <SSOSignupPage service={this.state.service} />;
+        } else if (this.state.page === 'gitlab') {
+            return <SSOSignupPage service={Constants.GITLAB_SERVICE} />;
         }
-
-        return (
-            <ChoosePage
-                services={this.props.services}
-                updatePage={this.updatePage}
-            />
-        );
     }
 }
-
-TeamSignUp.defaultProps = {
-    services: []
-};
-TeamSignUp.propTypes = {
-    services: React.PropTypes.array
-};
-- 
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/signup_team.jsx | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

(limited to 'web/react/components/signup_team.jsx')

diff --git a/web/react/components/signup_team.jsx b/web/react/components/signup_team.jsx
index 91d79b919..d08608c9b 100644
--- a/web/react/components/signup_team.jsx
+++ b/web/react/components/signup_team.jsx
@@ -12,11 +12,21 @@ export default class TeamSignUp extends React.Component {
 
         this.updatePage = this.updatePage.bind(this);
 
-        if (global.window.config.AllowSignUpWithEmail && global.window.config.AllowSignUpWithGitLab) {
+        var count = 0;
+
+        if (global.window.config.AllowSignUpWithEmail === 'true') {
+            count = count + 1;
+        }
+
+        if (global.window.config.AllowSignUpWithGitLab === 'true') {
+            count = count + 1;
+        }
+
+        if (count > 1) {
             this.state = {page: 'choose'};
-        } else if (global.window.config.AllowSignUpWithEmail) {
+        } else if (global.window.config.AllowSignUpWithEmail === 'true') {
             this.state = {page: 'email'};
-        } else if (global.window.config.AllowSignUpWithGitLab) {
+        } else if (global.window.config.AllowSignUpWithGitLab === 'true') {
             this.state = {page: 'gitlab'};
         }
     }
-- 
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/signup_team.jsx | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'web/react/components/signup_team.jsx')

diff --git a/web/react/components/signup_team.jsx b/web/react/components/signup_team.jsx
index d08608c9b..7f320e0b2 100644
--- a/web/react/components/signup_team.jsx
+++ b/web/react/components/signup_team.jsx
@@ -14,19 +14,19 @@ export default class TeamSignUp extends React.Component {
 
         var count = 0;
 
-        if (global.window.config.AllowSignUpWithEmail === 'true') {
+        if (global.window.config.EnableSignUpWithEmail === 'true') {
             count = count + 1;
         }
 
-        if (global.window.config.AllowSignUpWithGitLab === 'true') {
+        if (global.window.config.EnableSignUpWithGitLab === 'true') {
             count = count + 1;
         }
 
         if (count > 1) {
             this.state = {page: 'choose'};
-        } else if (global.window.config.AllowSignUpWithEmail === 'true') {
+        } else if (global.window.config.EnableSignUpWithEmail === 'true') {
             this.state = {page: 'email'};
-        } else if (global.window.config.AllowSignUpWithGitLab === 'true') {
+        } else if (global.window.config.EnableSignUpWithGitLab === 'true') {
             this.state = {page: 'gitlab'};
         }
     }
-- 
cgit v1.2.3-1-g7c22


From ccf2e6e4e74fc249a094c2c27de675644f1065cb Mon Sep 17 00:00:00 2001
From: =Corey Hulen <corey@hulen.com>
Date: Wed, 23 Sep 2015 13:47:10 -0700
Subject: Changing image settings to file settings

---
 web/react/components/signup_team.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'web/react/components/signup_team.jsx')

diff --git a/web/react/components/signup_team.jsx b/web/react/components/signup_team.jsx
index 7f320e0b2..4112138fa 100644
--- a/web/react/components/signup_team.jsx
+++ b/web/react/components/signup_team.jsx
@@ -4,7 +4,7 @@
 const ChoosePage = require('./team_signup_choose_auth.jsx');
 const EmailSignUpPage = require('./team_signup_with_email.jsx');
 const SSOSignupPage = require('./team_signup_with_sso.jsx');
-var Constants = require('../utils/constants.jsx');
+const Constants = require('../utils/constants.jsx');
 
 export default class TeamSignUp extends React.Component {
     constructor(props) {
-- 
cgit v1.2.3-1-g7c22

