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)
committerMatt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Mon, 13 Nov 2023 14:19:29 +0000 (14:19 +0000)
commitc238416b3667382ff8709dd8426a08071f69b6a0
tree2d02f1f745794ebbde8c2efde39d56b0adb51be0
parent7d62fd2dafb62872dd4b4aabe46ab7cd19d79b60
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>
(cherry picked from commit cd7a8840d54a8db00096e1e9044e600c226935a8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 28320fe33aab11f3ec4fd4ee33e80ca4c6c70fae)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt