From b013f02209c7c128a35d1c54f2d4a7d6a9701f72 Mon Sep 17 00:00:00 2001
From: Reed Garmsen <rgarmsen2295@gmail.com>
Date: Wed, 13 Jan 2016 14:58:49 -0800
Subject: Added ability to sign in via username; separated email sign in and
 sign up config settings

---
 web/react/components/login.jsx | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

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

diff --git a/web/react/components/login.jsx b/web/react/components/login.jsx
index c4f530af0..0123a0f3c 100644
--- a/web/react/components/login.jsx
+++ b/web/react/components/login.jsx
@@ -2,6 +2,7 @@
 // See License.txt for license information.
 
 import LoginEmail from './login_email.jsx';
+import LoginUsername from './login_username.jsx';
 import LoginLdap from './login_ldap.jsx';
 
 import * as Utils from '../utils/utils.jsx';
@@ -35,7 +36,7 @@ export default class Login extends React.Component {
                             />
                         </span>
                     </a>
-           );
+            );
         }
 
         if (global.window.mm_config.EnableSignUpWithGoogle === 'true') {
@@ -87,7 +88,7 @@ export default class Login extends React.Component {
         }
 
         let emailSignup;
-        if (global.window.mm_config.EnableSignUpWithEmail === 'true') {
+        if (global.window.mm_config.EnableSignInWithEmail === 'true') {
             emailSignup = (
                 <LoginEmail
                     teamName={this.props.teamName}
@@ -189,6 +190,15 @@ export default class Login extends React.Component {
             );
         }
 
+        let usernameLogin = null;
+        if (global.window.mm_config.EnableSignInWithUsername === 'true') {
+            usernameLogin = (
+                <LoginUsername
+                    teamName={this.props.teamName}
+                />
+            );
+        }
+
         return (
             <div className='signup-team__container'>
                 <h5 className='margin--less'>
@@ -210,6 +220,7 @@ export default class Login extends React.Component {
                     {extraBox}
                     {loginMessage}
                     {emailSignup}
+                    {usernameLogin}
                     {ldapLogin}
                     {userSignUp}
                     {findTeams}
-- 
cgit v1.2.3-1-g7c22

