]> git.koha-community.org Git - koha.git/commit
Bug 33684: Make mandatory date fields required when editing a patron
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 9 May 2023 08:11:19 +0000 (10:11 +0200)
committerLucas Gass <lucas@bywatersolutions.com>
Thu, 15 Jun 2023 19:06:17 +0000 (19:06 +0000)
commit387fddf99926905f5d12bb02dff7ec4ef48abaca
treedcc2c8b76a12878cd990fef57a5ec6b1e66dce0f
parent547412306d3e588904b1a5b8b955571925b9a456
Bug 33684: Make mandatory date fields required when editing a patron

Date fields in BorrowerMandatoryField are not required by the validation
form when a new patron is added or modified.

This is because the 'required' prop does not exist on the input element
when the flatpickr instance is created.
We should either add it in the DOM directly (tt), but it will require to
do it "manually" for each date fields, or add it when we add it to the
inputs. This patch implements the second option.

Test plan:
1. Add "dateofbirth" to syspref BorrowerMandatoryField.
2. Add patron and leave date of birth input field empty.
3. Save.
=> Form is not submitted and you are asked to fill in a date of birth

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
https://bugs.koha-community.org/show_bug.cgi?id=33648
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit ae3d6f1876c807aed3efb908f538e83bf6376abe)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
(cherry picked from commit 112f27f61e5f1cff42becbe7027df603f1348d5e)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/js/members.js