From 84268b66ae01c58e01ab1fa094e15d2025ba8757 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Fri, 20 Oct 2023 14:35:26 +0000 Subject: [PATCH] Bug 34497: (QA follow-up):Fix required text field input.value can be either null (if flatpickr date field empty) or '' (if simple text input empty), so account for both situations. Add missing 'required' attribute to text inputs. Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/intranet-tmpl/prog/js/vue/components/Dialog.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Dialog.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Dialog.vue index 452038cd6d..960c3075c7 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Dialog.vue +++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Dialog.vue @@ -38,6 +38,7 @@ v-if="input.type == 'Text'" :id="`confirmation_input_${input.id}`" v-model="input.value" + :required="input.required" /> @@ -87,7 +88,9 @@ export default { if ( this.confirmation.inputs && this.confirmation.inputs.filter( - input => input.required && input.value == null + input => + input.required && + (input.value == null || input.value == "") ).length ) { this.$refs.confirmationform.reportValidity() -- 2.39.5