diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-01-04 15:55:51 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-01-04 15:55:51 -0500 |
commit | 67db3ca8ce5e78ee55c37a3dbfb8e5d44037a324 (patch) | |
tree | 6ffac556a09192e7042d7ab2c184382286338c90 /web/react/components/login.jsx | |
parent | 07efe758609929e662185199e8c5a273b0fb0007 (diff) | |
parent | a6ae90ac2a74871331707751e823b4746136ff09 (diff) | |
download | chat-67db3ca8ce5e78ee55c37a3dbfb8e5d44037a324.tar.gz chat-67db3ca8ce5e78ee55c37a3dbfb8e5d44037a324.tar.bz2 chat-67db3ca8ce5e78ee55c37a3dbfb8e5d44037a324.zip |
Merge pull request #1745 from mattermost/plt-1118
PLT-1118 Add ability to switch between SSO and email account
Diffstat (limited to 'web/react/components/login.jsx')
-rw-r--r-- | web/react/components/login.jsx | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/web/react/components/login.jsx b/web/react/components/login.jsx index 9afaa8b0d..1d9b3e906 100644 --- a/web/react/components/login.jsx +++ b/web/react/components/login.jsx @@ -1,10 +1,12 @@ // Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. -import * as Utils from '../utils/utils.jsx'; import LoginEmail from './login_email.jsx'; import LoginLdap from './login_ldap.jsx'; +import * as Utils from '../utils/utils.jsx'; +import Constants from '../utils/constants.jsx'; + export default class Login extends React.Component { constructor(props) { super(props); @@ -40,15 +42,24 @@ export default class Login extends React.Component { ); } - const verifiedParam = Utils.getUrlParameter('verified'); - let verifiedBox = ''; - if (verifiedParam) { - verifiedBox = ( - <div className='alert alert-success'> - <i className='fa fa-check' /> - {' Email Verified'} - </div> - ); + const extraParam = Utils.getUrlParameter('extra'); + let extraBox = ''; + if (extraParam) { + let msg; + if (extraParam === Constants.SIGNIN_CHANGE) { + msg = ' Sign-in method changed successfully'; + } else if (extraParam === Constants.SIGNIN_VERIFIED) { + msg = ' Email Verified'; + } + + if (msg != null) { + extraBox = ( + <div className='alert alert-success'> + <i className='fa fa-check' /> + {msg} + </div> + ); + } } let emailSignup; @@ -124,7 +135,7 @@ export default class Login extends React.Component { <h5 className='margin--less'>{'Sign in to:'}</h5> <h2 className='signup-team__name'>{teamDisplayName}</h2> <h2 className='signup-team__subdomain'>{'on '}{global.window.mm_config.SiteName}</h2> - {verifiedBox} + {extraBox} {loginMessage} {emailSignup} {ldapLogin} |