From 7ef3236038a232283b05993de3f0db4e73157264 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Sat, 9 Nov 2024 21:15:41 +0100 Subject: [PATCH] Add possibility to allow/disallow main email, email alias and email forward form portal --- components/TextInputList.vue | 5 ++++- components/UserInfoForm.vue | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/components/TextInputList.vue b/components/TextInputList.vue index 2507008..57b4151 100644 --- a/components/TextInputList.vue +++ b/components/TextInputList.vue @@ -8,6 +8,7 @@ const props = defineProps<{ buttonLabel: string type: HTMLInputElement['type'] placeholder?: string + disabled: boolean }>() const group: Ref = ref(null) @@ -42,6 +43,7 @@ function onAdd() { :name="`${name}[${idx}]`" :type="type" :placeholder="placeholder" + :disabled="disabled" class="join-item w-full" /> - + diff --git a/components/UserInfoForm.vue b/components/UserInfoForm.vue index 1743680..7e6410a 100644 --- a/components/UserInfoForm.vue +++ b/components/UserInfoForm.vue @@ -92,7 +92,7 @@ const onSubmit = handleSubmit(async (form) => { - + { :button-label="$t('add_mail')" :placeholder="$t('new_mail')" class="mb-10" + :disabled="!user.can_edit_email_alias" /> { :input-label="$t('mail_forward')" :button-label="$t('add_forward')" :placeholder="$t('new_forward')" + :disabled="!user.can_edit_email_forward" />