summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorCarlos Tadeu Panato Junior <ctadeu@gmail.com>2017-01-31 15:36:31 +0100
committerChristopher Speller <crspeller@gmail.com>2017-01-31 09:36:31 -0500
commit6806df6f9390b0435f8eae21ddaaaefdb42f15a2 (patch)
tree2482f7dfd7e447930df6ad30939f051f1331c255 /webapp
parent3a17e9686695d4fb17558ce57d4560a0f62cf3c5 (diff)
downloadchat-6806df6f9390b0435f8eae21ddaaaefdb42f15a2.tar.gz
chat-6806df6f9390b0435f8eae21ddaaaefdb42f15a2.tar.bz2
chat-6806df6f9390b0435f8eae21ddaaaefdb42f15a2.zip
Clicking on email verification does not automatically fill in your email (#5140)
* implement Clicking on email verification does not automatically fill in your email * set the cursor to the password field * update per review * update per review
Diffstat (limited to 'webapp')
-rw-r--r--webapp/components/login/login_controller.jsx11
1 files changed, 10 insertions, 1 deletions
diff --git a/webapp/components/login/login_controller.jsx b/webapp/components/login/login_controller.jsx
index 535cdfd12..9bb8a4324 100644
--- a/webapp/components/login/login_controller.jsx
+++ b/webapp/components/login/login_controller.jsx
@@ -42,12 +42,17 @@ export default class LoginController extends React.Component {
this.handleLoginIdChange = this.handleLoginIdChange.bind(this);
this.handlePasswordChange = this.handlePasswordChange.bind(this);
+ let loginId = '';
+ if (this.props.location.query.extra === Constants.SIGNIN_VERIFIED && this.props.location.query.email) {
+ loginId = this.props.location.query.email;
+ }
+
this.state = {
ldapEnabled: global.window.mm_license.IsLicensed === 'true' && global.window.mm_config.EnableLdap === 'true',
usernameSigninEnabled: global.window.mm_config.EnableSignInWithUsername === 'true',
emailSigninEnabled: global.window.mm_config.EnableSignInWithEmail === 'true',
samlEnabled: global.window.mm_license.IsLicensed === 'true' && global.window.mm_config.EnableSaml === 'true',
- loginId: '', // the browser will set a default for this
+ loginId,
password: '',
showMfa: false,
loading: false
@@ -61,6 +66,10 @@ export default class LoginController extends React.Component {
GlobalActions.redirectUserToDefaultTeam();
}
+ if (this.props.location.query.extra === Constants.SIGNIN_VERIFIED && this.props.location.query.email) {
+ this.refs.password.focus();
+ }
+
AsyncClient.checkVersion();
}