mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
fix: input fields (PR #1110 from NickMolloy/improve-input-attributes)
* Use correct input type "string" is not a valid input type: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types "text" is the actual valid value. * Use correct autocomplete values for credential fields "true", "on", and "confirm-password" are not valid autocomplete values https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete
This commit is contained in:
parent
797cd8c28f
commit
b4197e54e6
@ -113,7 +113,7 @@ const HostedAuth: VFC<IHostedAuthProps> = ({ authDetails, redirect }) => {
|
||||
label="Username or email"
|
||||
name="username"
|
||||
id="username"
|
||||
type="string"
|
||||
type="text"
|
||||
onChange={evt => setUsername(evt.target.value)}
|
||||
value={username}
|
||||
error={Boolean(usernameError)}
|
||||
@ -130,6 +130,7 @@ const HostedAuth: VFC<IHostedAuthProps> = ({ authDetails, redirect }) => {
|
||||
value={password}
|
||||
error={Boolean(passwordError)}
|
||||
helperText={passwordError}
|
||||
autoComplete="current-password"
|
||||
data-testid={LOGIN_PASSWORD_ID}
|
||||
/>
|
||||
<Grid container>
|
||||
|
@ -117,12 +117,12 @@ const PasswordAuth: VFC<IPasswordAuthProps> = ({ authDetails, redirect }) => {
|
||||
label="Username or email"
|
||||
name="username"
|
||||
id="username"
|
||||
type="string"
|
||||
type="text"
|
||||
onChange={evt => setUsername(evt.target.value)}
|
||||
value={username}
|
||||
error={Boolean(usernameError)}
|
||||
helperText={usernameError}
|
||||
autoComplete="true"
|
||||
autoComplete="username"
|
||||
data-testid={LOGIN_EMAIL_ID}
|
||||
variant="outlined"
|
||||
size="small"
|
||||
@ -136,7 +136,7 @@ const PasswordAuth: VFC<IPasswordAuthProps> = ({ authDetails, redirect }) => {
|
||||
value={password}
|
||||
error={Boolean(passwordError)}
|
||||
helperText={passwordError}
|
||||
autoComplete="true"
|
||||
autoComplete="current-password"
|
||||
data-testid={LOGIN_PASSWORD_ID}
|
||||
/>
|
||||
<Button
|
||||
|
@ -115,7 +115,7 @@ const EditProfile = ({
|
||||
label="Password"
|
||||
name="password"
|
||||
value={password}
|
||||
autoComplete="on"
|
||||
autoComplete="new-password"
|
||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
|
||||
setPassword(e.target.value)
|
||||
}
|
||||
@ -125,7 +125,7 @@ const EditProfile = ({
|
||||
label="Confirm password"
|
||||
name="confirmPassword"
|
||||
value={confirmPassword}
|
||||
autoComplete="on"
|
||||
autoComplete="new-password"
|
||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
|
||||
setConfirmPassword(e.target.value)
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ const ResetPasswordForm = ({ token, setLoading }: IResetPasswordProps) => {
|
||||
setPassword(e.target.value)
|
||||
}
|
||||
onFocus={() => setShowPasswordChecker(true)}
|
||||
autoComplete="password"
|
||||
autoComplete="new-password"
|
||||
data-loading
|
||||
/>
|
||||
<PasswordField
|
||||
@ -124,7 +124,7 @@ const ResetPasswordForm = ({ token, setLoading }: IResetPasswordProps) => {
|
||||
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
|
||||
setConfirmPassword(e.target.value)
|
||||
}
|
||||
autoComplete="confirm-password"
|
||||
autoComplete="new-password"
|
||||
data-loading
|
||||
/>
|
||||
<ConditionallyRender
|
||||
|
Loading…
Reference in New Issue
Block a user