From 6c2894e03dc99ac792125a4b7e5fd8f80ab0859d Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Wed, 13 Nov 2024 23:23:06 +0100 Subject: [PATCH] forms: disable autocapitalize for usernames & spellcheck for usernames and fullnames --- app/src/views/LoginView.vue | 2 ++ app/src/views/PostInstall.vue | 13 +++++++++++-- app/src/views/user/UserCreate.vue | 3 +++ app/src/views/user/UserEdit.vue | 8 +++++++- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/app/src/views/LoginView.vue b/app/src/views/LoginView.vue index 526685c28..4b1ee5a65 100644 --- a/app/src/views/LoginView.vue +++ b/app/src/views/LoginView.vue @@ -35,6 +35,8 @@ const fields = { cProps: { id: 'username', autocomplete: 'username', + autocapitalize: 'off', + spellcheck: 'false', }, } satisfies FieldProps<'InputItem', Form['username']>, diff --git a/app/src/views/PostInstall.vue b/app/src/views/PostInstall.vue index fcbda600a..aedf8e17c 100644 --- a/app/src/views/PostInstall.vue +++ b/app/src/views/PostInstall.vue @@ -52,14 +52,23 @@ const fields = { component: 'InputItem', label: t('user_username'), rules: { required, alphalownumdot_ }, - cProps: { id: 'username', placeholder: t('placeholder.username') }, + cProps: { + id: 'username', + placeholder: t('placeholder.username'), + autocapitalize: 'off', + spellcheck: 'false', + }, } satisfies FieldProps<'InputItem', Form['username']>, fullname: { component: 'InputItem', label: t('user_fullname'), rules: { required, name }, - cProps: { id: 'fullname', placeholder: t('placeholder.fullname') }, + cProps: { + id: 'fullname', + placeholder: t('placeholder.fullname'), + spellcheck: 'false', + }, } satisfies FieldProps<'InputItem', Form['fullname']>, password: { diff --git a/app/src/views/user/UserCreate.vue b/app/src/views/user/UserCreate.vue index 912ad1153..845817ac3 100644 --- a/app/src/views/user/UserCreate.vue +++ b/app/src/views/user/UserCreate.vue @@ -48,6 +48,8 @@ const fields = { cProps: { id: 'username', placeholder: t('placeholder.username'), + autocapitalize: 'off', + spellcheck: 'false', }, }) satisfies FieldProps<'InputItem', Form['username']>, @@ -59,6 +61,7 @@ const fields = { cProps: { id: 'fullname', placeholder: t('placeholder.fullname'), + spellcheck: 'false', }, } satisfies FieldProps<'InputItem', Form['fullname']>, diff --git a/app/src/views/user/UserEdit.vue b/app/src/views/user/UserEdit.vue index cdab2fe32..75d2ea128 100644 --- a/app/src/views/user/UserEdit.vue +++ b/app/src/views/user/UserEdit.vue @@ -58,7 +58,12 @@ const fields = reactive({ username: { component: 'InputItem', label: t('user_username'), - cProps: { id: 'username', disabled: true }, + cProps: { + id: 'username', + disabled: true, + autocapitalize: 'off', + spellcheck: 'false', + }, } satisfies FieldProps<'InputItem', Form['username']>, fullname: { @@ -68,6 +73,7 @@ const fields = reactive({ cProps: { id: 'fullname', placeholder: t('placeholder.fullname'), + spellcheck: 'false', }, } satisfies FieldProps<'InputItem', Form['fullname']>,