From 24b1e71cbff85c0104e812745da9caf96b5401ae Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Fri, 9 Aug 2024 16:42:31 +0530 Subject: [PATCH] [WEB-2211] fix: input autoComplete (#5333) * fix: input autoComplete * chore: code refactor * chore: set autoComplete on for email, password and name --- admin/app/general/form.tsx | 1 + admin/core/components/instance/setup-form.tsx | 4 ++++ admin/core/components/login/sign-in-form.tsx | 2 ++ packages/ui/src/form-fields/input.tsx | 14 +++++++++++++- space/core/components/account/auth-forms/email.tsx | 1 + .../components/account/auth-forms/password.tsx | 1 + web/app/accounts/forgot-password/page.tsx | 1 + web/app/accounts/reset-password/page.tsx | 2 ++ web/app/accounts/set-password/page.tsx | 2 ++ web/app/profile/page.tsx | 3 +++ web/core/components/account/auth-forms/email.tsx | 1 + .../components/account/auth-forms/password.tsx | 1 + .../components/account/auth-forms/unique-code.tsx | 1 + web/core/components/onboarding/profile-setup.tsx | 3 +++ 14 files changed, 36 insertions(+), 1 deletion(-) diff --git a/admin/app/general/form.tsx b/admin/app/general/form.tsx index 380f39357..4422ee91f 100644 --- a/admin/app/general/form.tsx +++ b/admin/app/general/form.tsx @@ -86,6 +86,7 @@ export const GeneralConfigurationForm: FC = observer( value={instanceAdmins[0]?.user_detail?.email ?? ""} placeholder="Admin email" className="w-full cursor-not-allowed !text-custom-text-400" + autoComplete="on" disabled /> diff --git a/admin/core/components/instance/setup-form.tsx b/admin/core/components/instance/setup-form.tsx index ec3919896..7e987dbdf 100644 --- a/admin/core/components/instance/setup-form.tsx +++ b/admin/core/components/instance/setup-form.tsx @@ -174,6 +174,7 @@ export const InstanceSetupForm: FC = (props) => { placeholder="Wilber" value={formData.first_name} onChange={(e) => handleFormChange("first_name", e.target.value)} + autoComplete="on" autoFocus /> @@ -190,6 +191,7 @@ export const InstanceSetupForm: FC = (props) => { placeholder="Wright" value={formData.last_name} onChange={(e) => handleFormChange("last_name", e.target.value)} + autoComplete="on" /> @@ -208,6 +210,7 @@ export const InstanceSetupForm: FC = (props) => { value={formData.email} onChange={(e) => handleFormChange("email", e.target.value)} hasError={errorData.type && errorData.type === EErrorCodes.INVALID_EMAIL ? true : false} + autoComplete="on" /> {errorData.type && errorData.type === EErrorCodes.INVALID_EMAIL && errorData.message && (

{errorData.message}

@@ -247,6 +250,7 @@ export const InstanceSetupForm: FC = (props) => { hasError={errorData.type && errorData.type === EErrorCodes.INVALID_PASSWORD ? true : false} onFocus={() => setIsPasswordInputFocused(true)} onBlur={() => setIsPasswordInputFocused(false)} + autoComplete="on" /> {showPassword.password ? (