Bug 29212: (follow-up) Fixes to suspend hold process
authorOwen <oleonard@myacpl.org>
Mon, 1 Nov 2021 14:39:14 +0000 (14:39 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Tue, 1 Feb 2022 07:55:40 +0000 (21:55 -1000)
commit8389b5f3323ac34c0dab62637e989cdc4fc03035
treea6bd3bbdc4c8e444efd07721c556a74b4f76a801
parent168b3e670448b06c88e996d741ad77008795e84f
Bug 29212: (follow-up) Fixes to suspend hold process

This patch reworks the process of suspending an individual hold from the
patron's hold list. Instead of repeating the modal markup in each line
of the holds table, a single modal is re-used.

A "focus: false" is added to the modal via a data-attribute in order to
overcome problems with selecting months and using keyboard navigation in
the calendar popup.

To test, apply the patch and log into the OPAC as a user with holds.

- View the holds tab under "Your summary."
- Click the "Suspend" button next to one of the holds.
- You should see a modal which shows the title of the item in question.
- Test that the date picker works correctly:
  - Test selecting a month and year
  - Test selecting a date both with the mouse and by using arrow keys.
  - Test that you can clear the selected date both by clicking the X and
    by clicking the text link.
- Select a date and close the modal without submitting the suspension.
- Click the "Suspend" link on another title to confirm that the date
  picker still works correctly.
- Submit a suspension and confirm that the it completes successfully.
-

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt