From 394ed036476658b563ba5f24c82ad486ac87f170 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 18 Nov 2025 01:06:14 +0000 Subject: [PATCH] Bug 20844: (follow-up) Use js form submit and add cud- ops --- catalogue/updateitem.pl | 14 +++---- .../prog/en/modules/cataloguing/additem.tt | 41 ++++++++++++++----- 2 files changed, 35 insertions(+), 20 deletions(-) diff --git a/catalogue/updateitem.pl b/catalogue/updateitem.pl index e01bc1d0969..3f3da5371e4 100755 --- a/catalogue/updateitem.pl +++ b/catalogue/updateitem.pl @@ -40,18 +40,14 @@ my $withdrawn = $cgi->param('withdrawn'); my $damaged = $cgi->param('damaged'); my $exclude_from_local_holds_priority = $cgi->param('exclude_from_local_holds_priority'); my $bookable = $cgi->param('bookable') // q{}; -my $cancelhold = $cgi->param('cancelhold'); -my $reverthold = $cgi->param('reverthold'); my $redirecturl = $cgi->param('redirecturl'); -if ( defined $cancelhold ) { - LostItem( $itemnumber, 'moredetail', 0, { cancel_reserve => $cancelhold } ); -} elsif ( defined $reverthold ) { - $cancelhold = 0; - LostItem( $itemnumber, 'moredetail', 0, { cancel_reserve => $cancelhold } ); -} else { - $cancelhold = undef; +if ( $op eq "cud-cancelhold" ) { + LostItem( $itemnumber, 'moredetail', 0, { cancel_reserve => 1 } ); +} elsif ( $op eq "cud-reverthold" ) { + LostItem( $itemnumber, 'moredetail', 0, { cancel_reserve => undef } ); } + if ( defined $redirecturl ) { print $cgi->redirect( $redirecturl . $biblionumber ); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt index eafdc155217..0d29bf9611f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt @@ -105,17 +105,36 @@
The following item(s) have a waiting item-level hold and have been marked as lost.
[% END %] -- 2.39.5