From 6806df6f9390b0435f8eae21ddaaaefdb42f15a2 Mon Sep 17 00:00:00 2001 From: Carlos Tadeu Panato Junior Date: Tue, 31 Jan 2017 15:36:31 +0100 Subject: 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 --- webapp/components/login/login_controller.jsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'webapp') 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(); } -- cgit v1.2.3-1-g7c22