Bug 35000: Fix OPACMandatoryHoldDates feature in opac-reserve
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tue, 10 Oct 2023 11:36:45 +0000 (13:36 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 20 Oct 2023 20:22:03 +0000 (17:22 -0300)
commitcd7a8840d54a8db00096e1e9044e600c226935a8
tree20a7a0d5d3dd790ec841d76c11e3340e84dbf91f
parentf4b858778268730d49dc9f11d9d2d9bf6faf3f6e
Bug 35000: Fix OPACMandatoryHoldDates feature in opac-reserve

Somewhere (perhaps after bug 29012) this feature has been broken
somehow.
The fact that we have two inputs for the date and the active one
is one level deeper, requires a few adjustments in the jquery
selectors etc. (Note that two Required lines were visible too.)
The corrected jquery constructs become a bit complexer now.

Test plan:
Enable AllowHoldDateInFuture + OPACAllowHoldDateInFuture.
Set circ rule for book to test with allows item level holds.
Set OPACMandatoryHoldDates to no hold dates.
Place hold on a book in OPAC. Check that More options is collapsed.
(If you force item level holds, it will open.)
Set OPACMandatoryHoldDates to Hold start date.
Refresh place hold page. More options is expanded now.
Click Place hold. You should see an alert and focus goes to start date.
Set OPACMandatoryHoldDates to Hold end date. Repeat place hold.
Set OPACMandatoryHoldDates to Both hold dates. Fill one. Place hold.
Bonus: Place hold on multiple biblios. Repeat former steps.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt