Bugzilla – Attachment 108750 Details for
Bug 25534
Add ability to specifying and store a reason when cancelling a hold
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25534: Add reason to pendingreserves.pl
Bug-25534-Add-reason-to-pendingreservespl.patch (text/plain), 3.09 KB, created by
Kyle M Hall (khall)
on 2020-08-20 17:10:29 UTC
(
hide
)
Description:
Bug 25534: Add reason to pendingreserves.pl
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2020-08-20 17:10:29 UTC
Size:
3.09 KB
patch
obsolete
>From eb4b599707ef7f16382a8de46b01015ab9d8dae9 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 19 May 2020 13:43:24 -0400 >Subject: [PATCH] Bug 25534: Add reason to pendingreserves.pl > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> > >Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us> >--- > circ/pendingreserves.pl | 3 ++- > .../prog/en/modules/circ/pendingreserves.tt | 18 ++++++++++++++++-- > 2 files changed, 18 insertions(+), 3 deletions(-) > >diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl >index 081931816f..29bf15bd4e 100755 >--- a/circ/pendingreserves.pl >+++ b/circ/pendingreserves.pl >@@ -56,7 +56,8 @@ my @messages; > if ( $op eq 'cancel_reserve' and $reserve_id ) { > my $hold = Koha::Holds->find( $reserve_id ); > if ( $hold ) { >- $hold->cancel; >+ my $cancellation_reason = $input->param('cancellation-reasion'); >+ $hold->cancel({ cancellation_reason => $cancellation_reason }); > push @messages, { type => 'message', code => 'hold_cancelled' }; > } > } elsif ( $op =~ m|^mark_as_lost| ) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >index 09ab9895ef..509da746ce 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >@@ -151,10 +151,24 @@ > <form name="cancelReserve" action="/cgi-bin/koha/circ/pendingreserves.pl" method="post"> > <input type="hidden" name="op" value="cancel_reserve" /> > <input type="hidden" name="reserve_id" value="[% reserveloo.reserve_id | html %]" /> >+ >+ [% SET hold_cancellation = AuthorisedValues.GetAuthValueDropbox('HOLD_CANCELLATION') %] >+ [% IF hold_cancellation %] >+ <div class="form-group"> >+ <label for="cancellation-reason">Cancellation reason</label> >+ <select class="cancellation-reason" name="cancellation-reason" id="cancellation-reason"> >+ <option value="">No reason given</option> >+ [% FOREACH reason IN hold_cancellation %] >+ <option value="[% reason.authorised_value | html %]">[% reason.lib | html %]</option> >+ [% END %] >+ </select> >+ </div> >+ [% END %] >+ > [% IF reserveloo.holdingbranch != reserveloo.homebranch %] >- <input type="submit" value="Cancel hold and return to : [% Branches.GetName( reserveloo.homebranch ) | html %]" /> >+ <input class="btn btn-default" type="submit" value="Cancel hold and return to : [% Branches.GetName( reserveloo.homebranch ) | html %]" /> > [% ELSE %] >- <input type="submit" value="Cancel hold" /> >+ <input class="btn btn-default" type="submit" value="Cancel hold" /> > [% END %] > </form> > >-- >2.24.1 (Apple Git-126)
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 25534
:
105034
|
105035
|
105036
|
105077
|
105078
|
105079
|
105105
|
105106
|
105108
|
105109
|
105110
|
105111
|
105112
|
105113
|
105114
|
105115
|
105116
|
105117
|
105118
|
105119
|
105120
|
105121
|
105122
|
105147
|
105148
|
105149
|
105150
|
105151
|
108476
|
108477
|
108478
|
108479
|
108480
|
108481
|
108746
|
108747
|
108748
|
108749
|
108750
|
108751
|
108752
|
108753
|
108754
|
108755
|
108756
|
108757
|
108805
|
108806
|
108891
|
108892
|
108893
|
108894
|
108895
|
108896
|
108897
|
108898
|
108899
|
108900
|
108901
|
108902
|
108903
|
108904
|
108977
|
108985
|
108986
|
108990
|
114026
|
114027
|
114788