mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
Merge pull request #3416 from benjiwheeler/join-flow-show-password-default
change password default; remove unused state var
This commit is contained in:
commit
aabdd128f4
1 changed files with 2 additions and 7 deletions
|
@ -20,7 +20,6 @@ class UsernameStep extends React.Component {
|
|||
constructor (props) {
|
||||
super(props);
|
||||
bindAll(this, [
|
||||
'handleChangeShowPassword',
|
||||
'handleFocused',
|
||||
'handleSetUsernameRef',
|
||||
'handleValidSubmit',
|
||||
|
@ -30,17 +29,13 @@ class UsernameStep extends React.Component {
|
|||
'validateForm'
|
||||
]);
|
||||
this.state = {
|
||||
focused: null,
|
||||
showPassword: false
|
||||
focused: null
|
||||
};
|
||||
}
|
||||
componentDidMount () {
|
||||
// automatically start with focus on username field
|
||||
if (this.usernameInput) this.usernameInput.focus();
|
||||
}
|
||||
handleChangeShowPassword () {
|
||||
this.setState({showPassword: !this.state.showPassword});
|
||||
}
|
||||
// track the currently focused input field, to determine whether each field should
|
||||
// display a tooltip. (We only display it if a field is focused and has never been touched.)
|
||||
handleFocused (fieldName) {
|
||||
|
@ -114,7 +109,7 @@ class UsernameStep extends React.Component {
|
|||
username: '',
|
||||
password: '',
|
||||
passwordConfirm: '',
|
||||
showPassword: false
|
||||
showPassword: true
|
||||
}}
|
||||
validate={this.validateForm}
|
||||
validateOnBlur={false}
|
||||
|
|
Loading…
Reference in a new issue