From f882037c5e4f8d17c2e63d22ad59b938e5374de5 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. --- 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.30.2