Bug 39604: Remember cancelreserve choice when remembering patron for session
To test: 1. Put a few items on hold and make note of the barcodes. 2. Check out one of the items to a patron who doesn't have the hold 3. Check the cancel hold radio button 4. Also check the Remember for the session for this patron 5. Click 'Yes, check out' 6. Notice the item is checked out and the hold is cancelled 7. No checkout another on hold item to the same patron 8. No confirm screen ( good ) 9. The item is checked out ( good ) 10. The hold is not cancelled. ( bad ) 11. APPLY PATCH and restart all 12. Try steps 1 - 9 again. This time the 2nd hold should be cancelled. Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
574bd4f1fa
commit
6b80dec84d
|
|
@ -487,6 +487,9 @@ if ( @$barcodes && $op eq 'cud-checkout' ) {
|
|||
my ( $patron_for_session, $session_confirmations ) = split( /:/, $patron_session_confirmation, 2 );
|
||||
my $patron_match = $borrowernumber == $patron_for_session;
|
||||
my @conf_keys = split( /\|/, $session_confirmations );
|
||||
if ( $patron_match && grep { $_ eq 'cancelreserve' } @conf_keys ) {
|
||||
$cancelreserve = 1;
|
||||
}
|
||||
$template_params->{sessionConfirmationKeys} = ();
|
||||
|
||||
# pass needsconfirmation to template if issuing is possible and user hasn't yet confirmed.
|
||||
|
|
|
|||
|
|
@ -1729,6 +1729,12 @@ $(document).ready(function () {
|
|||
sessionConfirmations.push($(this).val());
|
||||
});
|
||||
|
||||
// Add cancelreserve checkbox state if it's checked
|
||||
if (rememberForSession) {
|
||||
if ($("#cancelreserve").is(":checked")) {
|
||||
sessionConfirmations.push("cancelreserve");
|
||||
}
|
||||
}
|
||||
if (currentPatron != borrowernumber && !rememberForSession) {
|
||||
Cookies.set("patronSessionConfirmation", borrowernumber + ":", {
|
||||
sameSite: "Lax",
|
||||
|
|
|
|||
Loading…
Reference in New Issue