Add autocomplete attributes

This commit is contained in:
Konstantin Wohlwend 2024-11-18 23:17:45 +01:00
parent c0808273e7
commit 11bec361f0
4 changed files with 7 additions and 0 deletions

View File

@ -595,6 +595,7 @@ function usePasswordSection() {
<Input
id="old-password"
type="password"
autocomplete="current-password"
{...register("oldPassword")}
/>
<FormWarningText text={errors.oldPassword?.message?.toString()} />
@ -604,6 +605,7 @@ function usePasswordSection() {
<Label htmlFor="new-password" className="mt-4 mb-1">{t("New password")}</Label>
<PasswordInput
id="new-password"
autocomplete="new-password"
{...registerPassword}
onChange={(e) => {
clearErrors('newPassword');
@ -616,6 +618,7 @@ function usePasswordSection() {
<Label htmlFor="repeat-password" className="mt-4 mb-1">{t("Repeat new password")}</Label>
<PasswordInput
id="repeat-password"
autocomplete="new-password"
{...registerPasswordRepeat}
onChange={(e) => {
clearErrors('newPassword');

View File

@ -93,6 +93,7 @@ export default function PasswordResetForm(props: {
<Label htmlFor="password" className="mb-1">{t("New Password")}</Label>
<PasswordInput
id="password"
autocomplete="new-password"
{...register('password')}
onChange={() => {
clearErrors('password');
@ -104,6 +105,7 @@ export default function PasswordResetForm(props: {
<Label htmlFor="repeat-password" className="mt-4 mb-1">{t("Repeat New Password")}</Label>
<PasswordInput
id="repeat-password"
autocomplete="new-password"
{...register('passwordRepeat')}
onChange={() => {
clearErrors('password');

View File

@ -59,6 +59,7 @@ export function CredentialSignIn() {
<Label htmlFor="password" className="mt-4 mb-1">{t('Password')}</Label>
<PasswordInput
id="password"
autocomplete="current-password"
{...register('password')}
/>
<FormWarningText text={errors.password?.message?.toString()} />

View File

@ -68,6 +68,7 @@ export function CredentialSignUp(props: { noPasswordRepeat?: boolean }) {
<Label htmlFor="password" className="mt-4 mb-1">{t('Password')}</Label>
<PasswordInput
id="password"
autocomplete="new-password"
{...registerPassword}
onChange={(e) => {
clearErrors('password');