Bug 26505 - Suspend hold modal broken in the OPAC
Summary: Suspend hold modal broken in the OPAC
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 20168
Blocks:
  Show dependency treegraph
 
Reported: 2020-09-22 10:27 UTC by Owen Leonard
Modified: 2020-09-28 09:10 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Text to go in the release notes:
Version(s) released in:
20.11.00


Attachments
Bug 26505: Suspend hold modal broken in the OPAC (10.57 KB, patch)
2020-09-23 10:59 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 26505: Suspend hold modal broken in the OPAC (10.71 KB, patch)
2020-09-23 12:17 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 26505: Suspend hold modal broken in the OPAC (10.75 KB, patch)
2020-09-23 21:48 UTC, David Nind
Details | Diff | Splinter Review
Bug 26505: Suspend hold modal broken in the OPAC (10.81 KB, patch)
2020-09-24 18:48 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2020-09-22 10:27:13 UTC
The suspend hold modal was broken by the Bootstrap 4 upgrade.
Comment 1 Owen Leonard 2020-09-23 10:59:12 UTC Comment hidden (obsolete)
Comment 2 Martin Renvoize 2020-09-23 11:04:07 UTC
FAIL   koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc
   FAIL   forbidden patterns
                forbidden pattern: Contains old bootstrap style for buttons (see bug 16239) (line 170)

Did we accidentally re-introduce an old button style here?
Comment 3 Owen Leonard 2020-09-23 12:17:57 UTC Comment hidden (obsolete)
Comment 4 David Nind 2020-09-23 21:48:29 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2020-09-24 18:48:49 UTC
Created attachment 110696 [details] [review]
Bug 26505: Suspend hold modal broken in the OPAC

This patch makes corrections to the markup for the suspend hold modal in
the OPAC. It hadn't been updated during the upgrade to Bootstrap 4.

The JavaScript controlling the "suspend until" datepicker has been
modified because the datepicker pop-up was not positioned correctly in
this new version.

Unrelated: The markup for confirmation modals has been updated to
replace Bootstrap 3's "btn-default" with Bootstrap 4's "btn-secondary."

To test, apply the patch and make sure the SuspendHoldsOpac and
AutoResumeSuspendedHolds system preferences are enabled.

- Log in to the OPAC as a user who has holds.
- On the "Your summary" page open the "Holds" tab.
- In the list of holds, click the "Suspend" button.
- The modal should appear and look correct.
- Test the "Suspend until" field: Clicking in the form field should
  trigger the datepicker. It should be positioned correctly under the
  form field.
- Confirm that the datepicker populates the field.
- Submit the suspension and confirm that the hold is suspended.
- Click the "Cancel" button for a hold. Confirm that the confirmation
  dialog appears correctly.

Edit: Updated class of hidden submit button. Test the page with JS
disabled to test that the "Suspend until" form works correctly.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Jonathan Druart 2020-09-28 09:10:56 UTC
Pushed to master for 20.11, thanks to everybody involved!