Bugzilla – Attachment 189648 Details for
Bug 20844
Reset a hold when it is missing after allocation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20844: (follow-up) Use js form submit and add cud- ops
Bug-20844-follow-up-Use-js-form-submit-and-add-cud.patch (text/plain), 4.56 KB, created by
Nick Clemens (kidclamp)
on 2025-11-18 01:06:47 UTC
(
hide
)
Description:
Bug 20844: (follow-up) Use js form submit and add cud- ops
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2025-11-18 01:06:47 UTC
Size:
4.56 KB
patch
obsolete
>From 394ed036476658b563ba5f24c82ad486ac87f170 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >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 @@ > <div class="dialog alert"> > The following item(s) have a waiting item-level hold and have been marked as lost. > <ul> >- [% FOREACH i IN waitinglostitems %] >- <br> >- <li>Item (<i>[% i.barcode | html %]</i>) >- <form action="../catalogue/updateitem.pl" method="post" class="inline"> >- <input type="hidden" name="itemnumber" value="[% i.itemnumber | html %]"> >- <input type="hidden" name="biblionumber" value="[% i.biblionumber | html %]"> >- <input type="hidden" name="redirecturl" value="../cataloguing/additem.pl?biblionumber="> >- <button type="submit" name="reverthold" value="1" class="btn btn-default"><i class="fa fa-undo"></i> Revert waiting status</button> >- <button type="submit" name="cancelhold" value="1" class="btn btn-default"><i class="fa fa-times"></i> Cancel hold</button></li> >- </form> >- [% END %] >+ [% FOREACH i IN waitinglostitems %] >+ <br /> >+ <li >+ >Item (<i>[% i.barcode | html %]</i>) >+ <a >+ class="btn btn-default btn-xs submit-form-link" >+ href="#" >+ data-itemnumber="[% i.itemnumber | html %]" >+ data-biblionumber="[% i.biblionumber | html %]" >+ data-redirecturl="../cataloguing/additem.pl?biblionumber=" >+ data-method="post" >+ data-op="cud-reverthold" >+ data-action="../catalogue/updateitem.pl" >+ > >+ Revert waiting status >+ </a> >+ <a >+ class="btn btn-default btn-xs submit-form-link" >+ href="#" >+ data-itemnumber="[% i.itemnumber | html %]" >+ data-biblionumber="[% i.biblionumber | html %]" >+ data-redirecturl="../cataloguing/additem.pl?biblionumber=" >+ data-method="post" >+ data-op="cud-cancelhold" >+ data-action="../catalogue/updateitem.pl" >+ > >+ Cancel hold >+ </a> >+ </li> >+ [% END %] > </ul> > </div> > [% END %] >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20844
:
79267
|
80760
|
80761
|
80890
|
80891
|
81045
|
81531
|
81623
|
81624
|
81640
|
81697
|
81698
|
81710
|
81711
|
81712
|
102334
|
102335
|
102336
|
113208
|
113209
|
113210
|
118264
|
118265
|
118266
|
125437
|
125438
|
125439
|
140214
|
140215
|
140216
|
150348
|
150349
|
150350
|
150480
|
159062
|
159063
|
159064
|
159065
|
159111
|
170263
|
170264
|
189623
|
189648
|
189688
|
189973
|
191958
|
191959
|
191960
|
191966
|
191981
|
191982
|
191983
|
191984