diff --git a/components/TextInputList.vue b/components/TextInputList.vue index a496abe..95d4d5e 100644 --- a/components/TextInputList.vue +++ b/components/TextInputList.vue @@ -5,8 +5,9 @@ const props = defineProps<{ name: string label: string inputLabel: string + buttonLabel: string type: HTMLInputElement['type'] - placeholder?: string + placeholder?: string, }>() const group: Ref = ref(null) @@ -55,6 +56,6 @@ function onAdd() { - + diff --git a/locales/en-US.json b/locales/en-US.json index 812cef2..6321c65 100644 --- a/locales/en-US.json +++ b/locales/en-US.json @@ -54,6 +54,8 @@ "footerlink_documentation": "Documentation", "footerlink_support": "Support", "footerlink_administration": "Administration", + "remove": "Remove", + "save": "Save", "skip_to_main_content": "Skip to main content", "v": { "field_invalid": "Field value is invalid", diff --git a/pages/edit.vue b/pages/edit.vue index a60efa2..9be35a2 100644 --- a/pages/edit.vue +++ b/pages/edit.vue @@ -78,14 +78,18 @@ const onSubmit = handleSubmit(async (form) => { // Reset form dirty state but keep previous values resetForm({ values: form }) const errData = error.value.data + let message + if (errData.path) { setFieldError(errData.path, errData.error) + message = t('user_saving_fail') } else { - feedback.value = { - variant: 'error', - icon: 'mdi:alert', - message: errData.error || errData, - } + message = errData.error || errData + } + feedback.value = { + variant: 'error', + icon: 'mdi:alert', + message, } } else if (data.value) { // redirect on password change @@ -145,6 +149,7 @@ const onSubmit = handleSubmit(async (form) => { type="email" :label="$t('mail_addresses')" :input-label="$t('mail_address')" + :button-label="$t('add_mail')" :placeholder="$t('new_mail')" class="mb-10" /> @@ -154,6 +159,7 @@ const onSubmit = handleSubmit(async (form) => { type="email" :label="$t('mail_forwards')" :input-label="$t('mail_forward')" + :button-label="$t('add_forward')" :placeholder="$t('new_forward')" />