From 5f4d97742d7ac4c073f322b7b3b514c5b58686d4 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 9 Feb 2024 11:01:17 +0000 Subject: [PATCH] Bug 34478: Add 'op' to circ/renew.pl Added 'cud-renew' op check to circ/renew.pl and added corresponding op params to: * includes/renew-search-box.tt * circ/renew.tt Signed-off-by: Jonathan Druart --- circ/renew.pl | 7 ++++--- .../intranet-tmpl/prog/en/includes/renew-search-box.inc | 2 ++ koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt | 9 +++++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/circ/renew.pl b/circ/renew.pl index 42ec13f6a0..52b38ddb8c 100755 --- a/circ/renew.pl +++ b/circ/renew.pl @@ -41,8 +41,9 @@ my ( $template, $librarian, $cookie, $flags ) = get_template_and_user( my $schema = Koha::Database->new()->schema(); -my $barcode = $cgi->param('barcode') // ''; -my $unseen = $cgi->param('unseen') || 0; +my $op = $cgi->param('op') || q{}; +my $barcode = $cgi->param('barcode') // ''; +my $unseen = $cgi->param('unseen') || 0; $barcode = barcodedecode($barcode) if $barcode; my $override_limit = $cgi->param('override_limit'); my $override_holds = $cgi->param('override_holds'); @@ -52,7 +53,7 @@ my ( $item, $checkout, $patron ); my $error = q{}; my ( $soonest_renew_date, $latest_auto_renew_date ); -if ($barcode) { +if ($op eq 'cud-renew' && $barcode) { $barcode = barcodedecode($barcode) if $barcode; $item = Koha::Items->find({ barcode => $barcode }); diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/renew-search-box.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/renew-search-box.inc index ccd148026c..011bd318a5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/renew-search-box.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/renew-search-box.inc @@ -7,6 +7,7 @@ [% END %]
[% INCLUDE 'csrf-token.inc' %] +
@@ -14,6 +15,7 @@
+
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt index fc7de6dc99..51ffb80c94 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt @@ -65,6 +65,7 @@ [% INCLUDE 'csrf-token.inc' %] + [% END %] @@ -78,6 +79,7 @@ [% INCLUDE 'csrf-token.inc' %] + [% END %] @@ -91,6 +93,7 @@ [% INCLUDE 'csrf-token.inc' %] + [% END %] @@ -104,6 +107,7 @@ [% INCLUDE 'csrf-token.inc' %] + [% END %] @@ -117,6 +121,7 @@ [% INCLUDE 'csrf-token.inc' %] + [% END %] @@ -130,6 +135,7 @@ [% INCLUDE 'csrf-token.inc' %] + [% END %] @@ -143,6 +149,7 @@ [% INCLUDE 'csrf-token.inc' %] + [% END %] @@ -160,6 +167,7 @@ + @@ -222,6 +230,7 @@ [% END %] +
-- 2.39.5