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
This commit is contained in:
Carlos Tadeu Panato Junior
2017-01-31 15:36:31 +01:00
committed by Christopher Speller
parent 3a17e96866
commit 6806df6f93

View File

@@ -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();
}