Bug 42193: Fix the "Suspend Hold" modal in the OPAC
In the OPAC, the "Suspend Hold" modal sometimes shows up as (and acts like) a "Resume Hold" modal. The reason for this is a left over "HOLD.suspend" in the template. "HOLD" should not be used in this template and is set as a side effect of the processing of "holds-table.inc".
Since there is a separate form that exist for the "Resume" action and the modal is only needed for suspension, this patch simply removes the inacurate conditional in the modal definition.
To test :
1. Have at least 2 holds.
2. In the holds table in the OPAC, make sure all holds are active and have a "Suspend" link.
3. Click the "Suspend" link on the newest hold (with the highest reserve_id).
=> The modal is titled "Suspend hold" and submitting it correctly suspends the hold.
4. Click the "Suspend" link on any of the other hold.
=> The modal is titled "Resume hold" and submitting it doesn't suspends the hold.
5. Apply patch
6. Repeat step 4.
=> The modal is titled "Suspend hold" and submitting it correctly suspends the hold.
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
e6d6a608c3
commit
4112dde941
|
|
@ -1032,13 +1032,8 @@
|
|||
<form action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
|
||||
[% INCLUDE 'csrf-token.inc' %]
|
||||
<div class="modal-header">
|
||||
[% IF HOLD.suspend %]
|
||||
<h1 class="modal-title" id="suspendModalLabel">Resume hold</h1>
|
||||
<input type="hidden" name="op" value="cud-unsuspend" />
|
||||
[% ELSE %]
|
||||
<h1 class="modal-title" id="suspendModalLabel">Suspend hold</h1>
|
||||
<input type="hidden" name="op" value="cud-suspend" />
|
||||
[% END %]
|
||||
<h1 class="modal-title" id="suspendModalLabel">Suspend hold</h1>
|
||||
<input type="hidden" name="op" value="cud-suspend" />
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
|
|
|||
Loading…
Reference in New Issue