From efb71933858aed1db7e3e00443daaaba19362afd Mon Sep 17 00:00:00 2001 From: Flupsi Date: Thu, 5 Jun 2025 18:14:01 +0200 Subject: [PATCH] feat(front): indicate required fields in edit form with an asterisk * --- front/src/components/library/EditForm.vue | 2 +- front/src/components/ui/input.scss | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/front/src/components/library/EditForm.vue b/front/src/components/library/EditForm.vue index dc5a7d243..89f513410 100644 --- a/front/src/components/library/EditForm.vue +++ b/front/src/components/library/EditForm.vue @@ -255,7 +255,7 @@ const resetField = (fieldId: string) => { :id="fieldConfig.id" v-model="values[fieldConfig.id]" :type="fieldConfig.inputType || 'text'" - :required="fieldConfig.required" + :required="fieldConfig.required || undefined" :name="fieldConfig.id" :label="fieldConfig.label" /> diff --git a/front/src/components/ui/input.scss b/front/src/components/ui/input.scss index 25e441fef..d4c946ff1 100644 --- a/front/src/components/ui/input.scss +++ b/front/src/components/ui/input.scss @@ -50,6 +50,10 @@ font-weight:600; } + &:has(>[required])>.label:after { + content: ' *'; + } + > .prefix, > .input-right { align-items: center;