From 688f43a11d426e2e60947b5c2a16f58f228f80e0 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Mon, 4 Aug 2025 12:01:46 +0000 Subject: [PATCH] Bug 40262: (QA follow-up): Fix compatibility with ILLOpacUnauthenticatedRequest This patch fixes the copyrightclearance_confirmed not saving if submitting an unauthenticated ILL request. --- .../prog/en/modules/ill/ill-requests.tt | 8 ++++---- opac/opac-illrequests.pl | 17 +++++++++-------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt index 9d05388f496..1c0f9e7f108 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt @@ -616,6 +616,10 @@

Request details

Details from library

+ [% copyrightclearance_confirmed = request.extended_attributes.find({'type'=>'copyrightclearance_confirmed'}).value %] + [% IF copyrightclearance_confirmed %] +
Patron has confirmed copyright clearance for this request
+ [% END %]
    [% IF request.orderid %] @@ -629,10 +633,6 @@ Patron: [% borrowerlink = "/cgi-bin/koha/members/moremember.pl" _ "?borrowernumber=" _ request.patron.borrowernumber %] [% request.patron.firstname _ " " _ request.patron.surname _ " [" _ request.patron.cardnumber _ "]" | html %] - [% copyrightclearance_confirmed = request.extended_attributes.find({'type'=>'copyrightclearance_confirmed'}).value %] - [% IF copyrightclearance_confirmed %] - Patron has confirmed copyright clearance for this request - [% END %] [% END %] [% IF request.biblio_id %] diff --git a/opac/opac-illrequests.pl b/opac/opac-illrequests.pl index f60c948ec64..0982584c6c3 100755 --- a/opac/opac-illrequests.pl +++ b/opac/opac-illrequests.pl @@ -200,6 +200,15 @@ if ( $op eq 'list' ) { ); if ( $backend_result->{stage} eq 'commit' ) { + $request->extended_attributes( + [ + { + type => 'copyrightclearance_confirmed', + value => 1, + } + ] + ) if $params->{copyrightclearance_confirmed}; + # After creation actions if ( $params->{type_disclaimer_submitted} ) { $type_disclaimer->after_request_created( $params, $request ); @@ -233,14 +242,6 @@ if ( $op eq 'list' ) { $session->flush; print $query->redirect('/cgi-bin/koha/opac-illrequests-unauthenticated.pl'); } else { - $request->extended_attributes( - [ - { - type => 'copyrightclearance_confirmed', - value => 1, - } - ] - ) if $params->{copyrightclearance_confirmed}; print $query->redirect('/cgi-bin/koha/opac-illrequests.pl?message=2'); exit; } -- 2.39.5