From 797586b9084ddcfeb8357ecd8acecb80ea821635 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 31 Jan 2024 11:56:04 +0100 Subject: [PATCH] Bug 34478: Add 'op' to opac-request-article Signed-off-by: Jonathan Druart --- .../bootstrap/en/modules/opac-request-article.tt | 6 +++--- opac/opac-request-article.pl | 11 ++++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt index 42f5e9f1bd..b646fa577d 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-request-article.tt @@ -40,10 +40,10 @@ [% ELSIF biblio.can_article_request( patron ) %]

Place article request for [% biblio.title | html %]

- [% IF ( disclaimer && !action) %] + [% IF ( disclaimer && !accepted ) %]
[% PROCESS koha_news_block news => disclaimer %] - Accept
[% ELSE %] @@ -63,7 +63,7 @@
[% INCLUDE 'csrf-token.inc' %] Place article request - +
diff --git a/opac/opac-request-article.pl b/opac/opac-request-article.pl index 88e2a228ab..d9bd885eed 100755 --- a/opac/opac-request-article.pl +++ b/opac/opac-request-article.pl @@ -41,7 +41,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( } ); -my $action = $cgi->param('action') || q{}; +my $op = $cgi->param('op') || q{}; my $biblionumber = $cgi->param('biblionumber'); my $biblio = Koha::Biblios->find($biblionumber); if( !$biblio ) { @@ -49,7 +49,7 @@ if( !$biblio ) { exit; } -if ( $action eq 'create' ) { +if ( $op eq 'cud-create' ) { my $branchcode = $cgi->param('branchcode'); my $itemnumber = $cgi->param('itemnumber') || undef; @@ -107,7 +107,7 @@ if ( $action eq 'create' ) { } # Should we redirect? } -elsif ( !$action && C4::Context->preference('ArticleRequestsOpacHostRedirection') ) { +elsif ( !$op && C4::Context->preference('ArticleRequestsOpacHostRedirection') ) { # Conditions: no items, host item entry (MARC21 773) my ( $host, $pageinfo ) = $biblio->get_marc_host( { no_items => 1 } ); if ($host) { @@ -129,12 +129,13 @@ if(!$patron->can_request_article) { } $template->param( article_request_fee => $patron->article_request_fee ) - if $action ne 'create'; + if $op ne 'cud-create'; $template->param( biblio => $biblio, patron => $patron, - action => $action + op => $op, + accepted => scalar $cgi->param('accepted'), ); output_html_with_http_headers $cgi, $cookie, $template->output, undef, { force_no_caching => 1 }; -- 2.39.5