Bugzilla – Attachment 140951 Details for
Bug 30579
When placing item level hold, some options that are not used are not disabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30579: Disentangle multi-hold and single bib forms
Bug-30579-Disentangle-multi-hold-and-single-bib-fo.patch (text/plain), 9.19 KB, created by
Nick Clemens (kidclamp)
on 2022-09-23 15:52:29 UTC
(
hide
)
Description:
Bug 30579: Disentangle multi-hold and single bib forms
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-09-23 15:52:29 UTC
Size:
9.19 KB
patch
obsolete
>From ead9e937b1c54269fcaa9933c5cdef2a4765a454 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 23 Sep 2022 15:06:05 +0000 >Subject: [PATCH] Bug 30579: Disentangle multi-hold and single bib forms > >This patch simply groups the forms so that multi-hold and single >hold are each in their own section > >While there is some duplication from this, it makes the sections easier to read >and allows for more variation in the two forms > >To test: >1 - Place a single bib and multi bib hold in staff client >2 - Apply this patch >3 - Repeat and confirm nothing changes with this patch >--- > .../prog/en/modules/reserve/request.tt | 50 +++++++------------ > reserve/placerequest.pl | 3 +- > 2 files changed, 21 insertions(+), 32 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >index 0ed253f766..ac239eb3d3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -504,6 +504,7 @@ > <div class="dialog alert hide holdalert"> > </div> > >+ [% UNLESS ( multi_hold ) %] > <fieldset class="rows"> > <legend>Hold details</legend> > <form action="placerequest.pl" method="post" name="form" id="hold-request-form"> >@@ -512,21 +513,9 @@ > [% FOREACH biblionumber IN biblionumbers %] > <input type="hidden" name="biblionumber" value="[% biblionumber | html %]"/> > [% END %] >- [% IF ( multi_hold ) %] >- <input type="hidden" name="multi_holds" id="multi_holds" value="1" /> >- <input type="hidden" name="request" value="any"/> >- [% FOREACH biblioloo IN biblioloop %] >- [% UNLESS biblioloo.none_avail %] >- <input type="hidden" name="holdable_bibs" id="holdable_bibs" value="[% biblioloo.biblionumber | html %]"/> >- <input type="hidden" name="title_[% biblioloo.biblionumber | html %]" value="[% biblioloo.title | html %]"/> >- <input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/> >- [% END %] >- [% END %] >- [% ELSE %] > <input type="hidden" name="holdable_bibs" id="holdable_bibs" value="[% biblio.biblionumber | html %]"/> > <input type="hidden" name="title" value="[% biblio.title | html %]" /> > <input type="hidden" name="rank-request" value="[% fixedRank | html %]" /> >- [% END # /IF multi_hold %] > > <ol> > <li> >@@ -538,12 +527,10 @@ > [% END %] > </li> > >- [% UNLESS ( multi_hold ) %] >- <li> >- <span class="label">Estimated priority:</span> >- <strong>[% fixedRank | html %]</strong> >- </li> >- [% END %] >+ <li> >+ <span class="label">Estimated priority:</span> >+ <strong>[% fixedRank | html %]</strong> >+ </li> > > <li> > <label for="holdnotes">Notes:</label> >@@ -551,23 +538,14 @@ > </li> > <li> > <label for="pickup">Pickup at:</label> >- [% UNLESS ( multi_hold ) %] > <select name="pickup" id="pickup" > data-biblio-id="[% biblio.biblionumber | html %]" > data-patron-id="[% patron.borrowernumber | html %]" > data-pickup-location-source="biblio"> > [% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %] >- [% ELSE %] >- <select name="pickup" id="pickup_multi" data-patron-id="[% patron.borrowernumber | html %]"> >- <option value="" selected="selected"></option> >- [% FOREACH pickup_location IN multi_pickup_locations %] >- <option value="[% pickup_location.branchcode | html %]">[% pickup_location.branchname | html %]</option> >- [% END %] >- [% END %] > </select> > </li> > >- [% UNLESS ( multi_hold ) %] > [% IF Koha.Preference('AllowHoldItemTypeSelection') %] > <li> > <label for="itemtype">Request specific item type:</label> >@@ -579,7 +557,6 @@ > </select> > </li> > [% END %] >- [% END # /UNLESS multi_hold %] > > [% IF ( reserve_in_future ) %] > <li> >@@ -593,7 +570,6 @@ > <input id="expiration_date" name="expiration_date" id="to" size="10" type="text" class="flatpickr" data-flatpickr-futuredate="true" /> > </li> > >- [% UNLESS ( multi_hold ) %] > <li> > <label for="requestany">Hold next available item </label> > [% IF force_hold_level == 'item' %] >@@ -615,7 +591,6 @@ > [% ELSE %] > <input type="hidden" name="holds_to_place_count" value="1" /> > [% END %] >- [% END # /UNLESS multi_hold %] > > <li id="non_priority_list_item"> > <label for="non_priority">Non priority hold:</label> >@@ -624,7 +599,6 @@ > </li> > </ol> > >- [% UNLESS ( multi_hold ) %] > <fieldset class="action"> > [% IF ( patron.borrowernumber ) %] > [% IF ( override_required ) %] >@@ -865,6 +839,20 @@ > [% END # /IF hiddencount %] > > [% ELSE # /UNLESS multi_hold %] >+ <fieldset class="rows"> >+ <legend>Hold details</legend> >+ <form action="placerequest.pl" method="post" name="form" id="hold-request-form"> >+ <input type="hidden" name="multi_holds" id="multi_holds" value="1" /> >+ <input type="hidden" name="request" value="any"/> >+ <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> >+ [% FOREACH biblioloo IN biblioloop %] >+ <input type="hidden" name="biblionumber" id="biblionumber" value="[% biblioloo.biblionumber | html %]"/> >+ [% UNLESS biblioloo.none_avail %] >+ <input type="hidden" name="holdable_bibs" id="holdable_bibs" value="[% biblioloo.biblionumber | html %]"/> >+ <input type="hidden" name="title_[% biblioloo.biblionumber | html %]" value="[% biblioloo.title | html %]"/> >+ <input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/> >+ [% END %] >+ [% END %] > > <table id="requesttitles"> > <tr> >diff --git a/reserve/placerequest.pl b/reserve/placerequest.pl >index 0fc7361b73..4be82ff061 100755 >--- a/reserve/placerequest.pl >+++ b/reserve/placerequest.pl >@@ -48,6 +48,7 @@ my $checkitem = $input->param('checkitem'); > my $expirationdate = $input->param('expiration_date'); > my $itemtype = $input->param('itemtype') || undef; > my $non_priority = $input->param('non_priority'); >+my $multi_holds = $input->param('multi_holds'); > > my $patron = Koha::Patrons->find( $borrowernumber ); > >@@ -102,7 +103,7 @@ if ( $patron ) { > } > } > >- } elsif (@biblionumbers > 1) { >+ } elsif (@biblionumbers > 1 || $multi_holds) { > my $bibinfo = $bibinfos{$biblionumber}; > if ( $can_override || CanBookBeReserved($patron->borrowernumber, $biblionumber)->{status} eq 'OK' ) { > AddReserve( >-- >2.30.2
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 30579
:
133549
|
133550
|
133574
|
133575
|
133689
|
133690
|
134270
|
134468
|
134469
|
134491
|
134492
|
134493
|
134893
|
134894
|
140951
|
140952
|
140953
|
140954
|
148835
|
148898
|
149271
|
150767
|
150786
|
151483
|
151493
|
151558
|
154881
|
154882
|
154883
|
154886
|
157787
|
157788
|
157789
|
157790
|
157791
|
157792
|
157937
|
157938
|
157939
|
157940
|
157941
|
157942
|
157943
|
163260
|
163261
|
163262
|
163263
|
163264
|
163265
|
163266
|
163267
|
166012
|
166013
|
166014
|
166015
|
166016
|
166017
|
166018
|
166019
|
166034
|
166035
|
166036
|
166037
|
166038
|
166039
|
166040
|
166041
|
166074
|
166075
|
166076
|
166077
|
166078
|
166079
|
166080
|
166081
|
166082
|
166264
|
166265
|
166266
|
166267
|
166268
|
166269
|
166270
|
166271
|
166272
|
166273
|
166274
|
166275