mirror of
https://github.com/enso-org/enso.git
synced 2024-11-30 04:02:19 +03:00
Fix password validation; add autocomplete attributes (#7896)
- Fixes https://github.com/enso-org/cloud-v2/issues/690 - Fixes password validation never becoming successful after failing once Other changes: - Add autocomplete attributes (Chrome said I should so 🤷) # Important Notes None
This commit is contained in:
parent
fbfaeb5530
commit
2ad19a5366
@ -57,6 +57,7 @@ export default function ForgotPassword() {
|
||||
id="email"
|
||||
type="email"
|
||||
name="email"
|
||||
autoComplete="email"
|
||||
placeholder="E-Mail Address"
|
||||
value={email}
|
||||
setValue={setEmail}
|
||||
|
@ -48,6 +48,7 @@ export default function Input(props: InputProps) {
|
||||
}
|
||||
const currentTarget = event.currentTarget
|
||||
if (error != null) {
|
||||
currentTarget.setCustomValidity('')
|
||||
currentTarget.setCustomValidity(
|
||||
currentTarget.checkValidity() ||
|
||||
shouldReportValidityRef?.current === false
|
||||
|
@ -113,6 +113,7 @@ export default function Login() {
|
||||
id="email"
|
||||
type="email"
|
||||
name="email"
|
||||
autoComplete="email"
|
||||
placeholder="E-Mail Address"
|
||||
value={email}
|
||||
setValue={setEmail}
|
||||
@ -137,6 +138,7 @@ export default function Login() {
|
||||
id="password"
|
||||
type="password"
|
||||
name="password"
|
||||
autoComplete="current-password"
|
||||
placeholder="Password"
|
||||
pattern={validation.PASSWORD_PATTERN}
|
||||
error={validation.PASSWORD_ERROR}
|
||||
|
@ -75,6 +75,7 @@ export default function Registration() {
|
||||
id="email"
|
||||
type="email"
|
||||
name="email"
|
||||
autoComplete="email"
|
||||
placeholder="E-Mail Address"
|
||||
value={email}
|
||||
setValue={setEmail}
|
||||
@ -98,6 +99,7 @@ export default function Registration() {
|
||||
id="password"
|
||||
type="password"
|
||||
name="password"
|
||||
autoComplete="new-password"
|
||||
placeholder="Password"
|
||||
pattern={validation.PASSWORD_PATTERN}
|
||||
error={validation.PASSWORD_ERROR}
|
||||
@ -123,6 +125,7 @@ export default function Registration() {
|
||||
id="password_confirmation"
|
||||
type="password"
|
||||
name="password_confirmation"
|
||||
autoComplete="new-password"
|
||||
placeholder="Confirm Password"
|
||||
pattern={string.regexEscape(password)}
|
||||
error={validation.CONFIRM_PASSWORD_ERROR}
|
||||
|
@ -86,6 +86,7 @@ export default function ResetPassword() {
|
||||
id="email"
|
||||
type="email"
|
||||
name="email"
|
||||
autoComplete="email"
|
||||
placeholder="E-Mail Address"
|
||||
value={email}
|
||||
setValue={setEmail}
|
||||
@ -108,6 +109,7 @@ export default function ResetPassword() {
|
||||
id="code"
|
||||
type="text"
|
||||
name="code"
|
||||
autoComplete="one-time-code"
|
||||
placeholder="Confirmation Code"
|
||||
value={code}
|
||||
setValue={setCode}
|
||||
@ -131,6 +133,7 @@ export default function ResetPassword() {
|
||||
id="new_password"
|
||||
type="password"
|
||||
name="new_password"
|
||||
autoComplete="new-password"
|
||||
placeholder="New Password"
|
||||
pattern={validation.PASSWORD_PATTERN}
|
||||
error={validation.PASSWORD_ERROR}
|
||||
@ -156,6 +159,7 @@ export default function ResetPassword() {
|
||||
id="new_password_confirm"
|
||||
type="password"
|
||||
name="new_password_confirm"
|
||||
autoComplete="new-password"
|
||||
placeholder="Confirm New Password"
|
||||
pattern={string.regexEscape(newPassword)}
|
||||
error={validation.CONFIRM_PASSWORD_ERROR}
|
||||
|
@ -52,6 +52,7 @@ export default function SetUsername() {
|
||||
id="username"
|
||||
type="text"
|
||||
name="username"
|
||||
autoComplete="off"
|
||||
placeholder="Username"
|
||||
value={username}
|
||||
setValue={setUsername}
|
||||
|
@ -63,6 +63,7 @@ export default function ChangePasswordModal() {
|
||||
id="old_password"
|
||||
type="password"
|
||||
name="old_password"
|
||||
autoComplete="current-password"
|
||||
placeholder="Old Password"
|
||||
pattern={validation.PASSWORD_PATTERN}
|
||||
error={validation.PASSWORD_ERROR}
|
||||
@ -84,6 +85,7 @@ export default function ChangePasswordModal() {
|
||||
id="new_password"
|
||||
type="password"
|
||||
name="new_password"
|
||||
autoComplete="new-password"
|
||||
placeholder="New Password"
|
||||
pattern={validation.PASSWORD_PATTERN}
|
||||
error={validation.PASSWORD_ERROR}
|
||||
@ -105,6 +107,7 @@ export default function ChangePasswordModal() {
|
||||
id="confirm_new_password"
|
||||
type="password"
|
||||
name="confirm_new_password"
|
||||
autoComplete="new-password"
|
||||
placeholder="Confirm New Password"
|
||||
pattern={string.regexEscape(newPassword)}
|
||||
error={validation.CONFIRM_PASSWORD_ERROR}
|
||||
|
Loading…
Reference in New Issue
Block a user