Commit 66b90a1e authored by Maxym Borodenko's avatar Maxym Borodenko Committed by Matija Obreza

Use autoComplete for username and password fields

parent 6f535c44
......@@ -184,6 +184,7 @@ class Login extends React.Component<ILoginProps, any> {
value={ username }
onChange={ this.handleUsername }
fullWidth
autoComplete="username"
/>
<TextField
className={ inMenu ? classes.input : '' }
......@@ -192,6 +193,7 @@ class Login extends React.Component<ILoginProps, any> {
value={ password }
onChange={ this.handlePassword }
fullWidth
autoComplete="current-password"
/>
{ this.state.error && (inMenu ? (
......
......@@ -36,6 +36,7 @@ class Registration extends React.Component<IRegistrationProps, any> {
component={ TextField }
validate={ [Validators.required, Validators.emailAddress] }
fullWidth
autoComplete="username"
/>
<Field
name="password"
......@@ -44,6 +45,7 @@ class Registration extends React.Component<IRegistrationProps, any> {
component={ TextField }
validate={ [Validators.required, Validators.passwordMinLength, Validators.passwordNumber, Validators.passwordSpecialChar] }
fullWidth
autoComplete="new-password"
/>
<Field
name="passwordConfirm"
......@@ -52,6 +54,7 @@ class Registration extends React.Component<IRegistrationProps, any> {
component={ TextField }
validate={ [Validators.required] }
fullWidth
autoComplete="new-password"
/>
<Field
name="fullName"
......
......@@ -22,6 +22,7 @@ class PasswordForm extends React.Component<any, void> {
label={ t('user.dashboard.c.passwordForm.oldPassword') }
component={ TextField }
validate={ [ Validators.required ] }
autoComplete="current-password"
/>
<Field
name="newPassword"
......@@ -29,6 +30,7 @@ class PasswordForm extends React.Component<any, void> {
label={ t('user.dashboard.c.passwordForm.newPassword') }
component={ TextField }
validate={ [ Validators.required ] }
autoComplete="new-password"
/>
<Field
name="confirmPassword"
......@@ -36,6 +38,7 @@ class PasswordForm extends React.Component<any, void> {
label={ t('user.dashboard.c.passwordForm.confirmPassword') }
component={ TextField }
validate={ [ Validators.required ] }
autoComplete="new-password"
/>
{ error && <div style={ { color: 'red' } }>{ error }</div> }
<Button variant="contained" type="submit" style={ { margin: '1rem 0 1rem 0' } } disabled={ submitting }>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment