Bugzilla – Attachment 82212 Details for
Bug 15565
Place multiple item-level holds at once for the same record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15565: (follow-up) Removed leftover debug code and added missing filters
Bug-15565-follow-up-Removed-leftover-debug-code-an.patch (text/plain), 15.65 KB, created by
Alex Buckley
on 2018-11-10 12:04:43 UTC
(
hide
)
Description:
Bug 15565: (follow-up) Removed leftover debug code and added missing filters
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2018-11-10 12:04:43 UTC
Size:
15.65 KB
patch
obsolete
>From afa002a5aa04af7cd1faf64c18a34240b0463da0 Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Sun, 28 Oct 2018 18:00:31 +0000 >Subject: [PATCH] Bug 15565: (follow-up) Removed leftover debug code and added > missing filters > >Sponsord-By: Brimbank Library, Australia > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > C4/Reserves.pm | 2 +- > .../prog/en/modules/reserve/request.tt | 6 +-- > .../opac-tmpl/bootstrap/en/modules/opac-reserve.tt | 54 +++++++++++----------- > opac/opac-reserve.pl | 5 -- > 4 files changed, 31 insertions(+), 36 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 78e8f6a..48aab41 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -172,7 +172,7 @@ sub AddReserve { > > $expdate = output_pref({ str => $expdate, dateonly => 1, dateformat => 'iso' }); > >- # if we have an item selectionned, and the pickup branch is the same as the holdingbranch >+ # if we have an item selected, and the pickup branch is the same as the holdingbranch > # of the document, we force the value $priority and $found . > if ( $checkitem and not C4::Context->preference('ReservesNeedReturns') ) { > $priority = 0; >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 915c4d7..a18e4f2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -316,9 +316,9 @@ > Hold must be record level > </span> > [% ELSIF ( itemloo.available ) %] >- <input type="checkbox" name="checkitem" value="[% itemloo.itemnumber %]" /> >+ <input type="checkbox" name="checkitem" value="[% itemloo.itemnumber | html %]" /> > [% ELSIF ( itemloo.override ) %] >- <input type="checkbox" name="checkitem" class="needsoverride" value="[% itemloo.itemnumber %]" /> >+ <input type="checkbox" name="checkitem" class="needsoverride" value="[% itemloo.itemnumber | html %]" /> > <i class="fa fa-exclamation-triangle fa-lg" style="color:gold" alt="Requires override of hold policy"/></i> > [% ELSE %] > <span class="error"> >@@ -671,7 +671,7 @@ > }; > var MSG_NO_ITEMS_AVAILABLE = _("A hold cannot be requested on any of these items."); > var MSG_EXCEEDED_HOLDS_PER_RECORD = _("Patron has exceeded the number of holds for this record."); >- var remainingHolds = "[% remaining_holds_for_record %]"; >+ var remainingHolds = "[% remaining_holds_for_record | html %]"; > > $(document).ready(function() { > function ToggleHoldsToPlace() { >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >index 41a0ef6..e3e0834 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >@@ -150,12 +150,12 @@ > > [% FOREACH bibitemloo IN bibitemloop %] > <div class="holdrow"> >- <input id="remaining_holds_[% bibitemloo.biblionumber %]" type="hidden" value="[% bibitemloo.remaining_holds_for_record %]"/> >+ <input id="remaining_holds_[% bibitemloo.biblionumber | html %]" type="hidden" value="[% bibitemloo.remaining_holds_for_record | html %]"/> > <p> > [% IF ( bibitemloo.holdable ) %] >- <span title="[% bibitemloo.biblionumber %]" style="padding:.3em"> >+ <span title="[% bibitemloo.biblionumber | html %]" style="padding:.3em"> > <label> >- <input class="biblionumbers" name="biblionumbers" type="checkbox" value="[% bibitemloo.biblionumber %]" checked="checked"> >+ <input class="biblionumbers" name="biblionumbers" type="checkbox" value="[% bibitemloo.biblionumber | html %]" checked="checked"> > Place a hold on > </label> > </span> >@@ -224,7 +224,7 @@ > <li class="branch"> > <label for="branch_[% bibitemloo.biblionumber | html %]">Pick up location:</label> > [% UNLESS ( bibitemloo.holdable ) %] >- <select name="branch_[% bibitemloo.biblionumber %]" id="branch_[% bibitemloo.biblionumber | html %]" disabled="disabled"> >+ <select name="branch_[% bibitemloo.biblionumber | html %]" id="branch_[% bibitemloo.biblionumber | html %]" disabled="disabled"> > [% PROCESS options_for_libraries libraries => Branches.all({ search_params => { pickup_location => 1 }, selected => branch }) %] > </select> > [% ELSE %] >@@ -300,16 +300,16 @@ > > <!-- ITEM HOLDS --> > <li class="lradio place_on_type" style="display:none;"> >- <label class="radio inline" for="reqany_[% bibitemloo.biblionumber %]">Next available item</label> >- <input type="radio" name="reqtype_[% bibitemloo.biblionumber %]" >- id="reqany_[% bibitemloo.biblionumber %]" >+ <label class="radio inline" for="reqany_[% bibitemloo.biblionumber | html %]">Next available item</label> >+ <input type="radio" name="reqtype_[% bibitemloo.biblionumber | html %]" >+ id="reqany_[% bibitemloo.biblionumber | html %]" > class="selectany" > value="Any" > checked="checked" > /> >- <label class="radio inline" for="reqspecific_[% bibitemloo.biblionumber %]">A specific item</label> >- <input type="radio" name="reqtype_[% bibitemloo.biblionumber %]" >- id="reqspecific_[% bibitemloo.biblionumber %]" >+ <label class="radio inline" for="reqspecific_[% bibitemloo.biblionumber | html %]">A specific item</label> >+ <input type="radio" name="reqtype_[% bibitemloo.biblionumber | html %]" >+ id="reqspecific_[% bibitemloo.biblionumber | html %]" > class="selectspecific" > value="Specific" > /> >@@ -318,20 +318,20 @@ > > [% IF bibitemloo.remaining_holds_for_record > 1 %] > [% SET count = 1 %] >- <div id="holds_to_place_[% bibitemloo.biblionumber %]" class="hold-options holds-to-place"> >+ <div id="holds_to_place_[% bibitemloo.biblionumber | html %]" class="hold-options holds-to-place"> > <label>Holds to place (count)</label> >- <select name="holds_to_place_count_[% bibitemloo.biblionumber %]"> >+ <select name="holds_to_place_count_[% bibitemloo.biblionumber | html %]"> > [% WHILE count <= bibitemloo.remaining_holds_for_record %] >- <option value="[% count %]">[% count %]</option> >+ <option value="[% count | html %]">[% count | html %]</option> > [% SET count = count + 1 %] > [% END %] > </select> > </div> > [% ELSE %] >- <input type="hidden" name="holds_to_place_count_[% bibitemloo.biblionumber %]" value="1" /> >+ <input type="hidden" name="holds_to_place_count_[% bibitemloo.biblionumber | html %]" value="1" /> > [% END %] > >- <table class="copiesrow table table-bordered table-striped" id="copiesrow_[% bibitemloo.biblionumber %]"> >+ <table class="copiesrow table table-bordered table-striped" id="copiesrow_[% bibitemloo.biblionumber | html %]"> > <caption>Select a specific item:</caption> > <tr> > <th>Copy number</th> >@@ -357,9 +357,9 @@ > <tr class="[% itemLoo.backgroundcolor | html %]"> > <td class="copynumber"> > [% IF ( itemLoo.available ) %] >- <input type="checkbox" class="checkitem checkitem_[% bibitemloo.biblionumber %]" name="checkitem_[% bibitemloo.biblionumber %]" value="[% itemLoo.itemnumber %]" /> >+ <input type="checkbox" class="checkitem checkitem_[% bibitemloo.biblionumber | html %]" name="checkitem_[% bibitemloo.biblionumber | html %]" value="[% itemLoo.itemnumber | html %]" /> > [% ELSE %] >- <input disabled="disabled" type="checkbox" class="checkitem" name="checkitem" value="[% itemLoo.itemnumber %]" >+ <input disabled="disabled" type="checkbox" class="checkitem" name="checkitem" value="[% itemLoo.itemnumber | html %]" > style="display:none;" /> > <img src="[% interface | html %]/lib/famfamfam/silk/cross.png" alt="Cannot be put on hold" title="Cannot be put on hold" /> > [% END %] >@@ -518,19 +518,19 @@ > [% FOREACH bibitemloo IN bibitemloop %] > [% IF bibitemloo.force_hold %] > [% IF bibitemloo.force_hold == 'item' %] >- $("#toggle-hold-options-[% bibitemloo.biblionumber %]").click(); >- $("#reqspecific_[% bibitemloo.biblionumber %]").attr('checked', true); >- $("#holds_to_place_[% bibitemloo.biblionumber %]").hide(); >- $("#copiesrow_[% bibitemloo.biblionumber %]").show(); >+ $("#toggle-hold-options-[% bibitemloo.biblionumber | html %]").click(); >+ $("#reqspecific_[% bibitemloo.biblionumber | html %]").attr('checked', true); >+ $("#holds_to_place_[% bibitemloo.biblionumber | html %]").hide(); >+ $("#copiesrow_[% bibitemloo.biblionumber | html %]").show(); > [% ELSIF bibitemloo.force_hold == 'record' %] >- $("#toggle-hold-options-[% bibitemloo.biblionumber %]").click(); >- $("#reqany_[% bibitemloo.biblionumber %]").attr('checked', true); >+ $("#toggle-hold-options-[% bibitemloo.biblionumber | html %]").click(); >+ $("#reqany_[% bibitemloo.biblionumber | html %]").attr('checked', true); > [% END %] >- $("#reqany_[% bibitemloo.biblionumber %]").attr('disabled', 'disabled'); >- $("#reqspecific_[% bibitemloo.biblionumber %]").attr('disabled', 'disabled'); >+ $("#reqany_[% bibitemloo.biblionumber | html %]").attr('disabled', 'disabled'); >+ $("#reqspecific_[% bibitemloo.biblionumber | html %]").attr('disabled', 'disabled'); > [% END %] > [% IF bibitemloo.reqholdnotes %] >- $("#holdnotes_[% bibitemloo.biblionumber %]").attr( 'required', true ); >+ $("#holdnotes_[% bibitemloo.biblionumber | html %]").attr( 'required', true ); > [% END %] > [% END %] > >@@ -613,7 +613,7 @@ > > // When 'Place Hold' button is clicked > $(".placehold").click(function(){ >- if (total_requested() + [% reserves_count %] > [% maxreserves %]) { >+ if (total_requested() + [% reserves_count | html %] > [% maxreserves | html %]) { > alert(MSG_MAX_HOLDS_EXCEEDED); > return false; > } >diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl >index 2babc34..5a7ced8 100755 >--- a/opac/opac-reserve.pl >+++ b/opac/opac-reserve.pl >@@ -44,7 +44,6 @@ use Koha::Libraries; > use Koha::Patrons; > use Date::Calc qw/Today Date_to_Days/; > use List::MoreUtils qw/uniq/; >-use Data::Dumper; > > my $maxreserves = C4::Context->preference("maxreserves"); > >@@ -267,10 +266,7 @@ if ( $query->param('place_reserve') ) { > $found = 'W' > unless C4::Context->preference('ReservesNeedReturns'); > } >- warn $itemnumber; >- warn $canreserve; > if ($canreserve) { >- warn $canreserve; > my $reserve_id = AddReserve( > $branch, $borrowernumber, > $biblionumber, >@@ -618,7 +614,6 @@ foreach my $biblioNum (@biblionumbers) { > } > ); > my $forced_hold_level = $holds->forced_hold_level(); >- warn $forced_hold_level; > if ($forced_hold_level) { > #$biblioLoopIter{force_hold} = 1 if $forced_hold_level eq 'item'; > #$biblioLoopIter{itemholdable} = 0 if $forced_hold_level eq 'record'; >-- >2.1.4
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 15565
:
47527
|
47551
|
47552
|
50068
|
50069
|
50392
|
50393
|
56229
|
56230
|
56231
|
56232
|
56458
|
56510
|
56511
|
56512
|
56513
|
56514
|
56515
|
56517
|
56518
|
56519
|
56520
|
56521
|
56522
|
56523
|
56524
|
61244
|
61245
|
61246
|
61247
|
61248
|
61576
|
61577
|
61578
|
61579
|
61580
|
64590
|
64591
|
64592
|
64593
|
64594
|
66594
|
66595
|
66596
|
66597
|
66598
|
68759
|
68760
|
68761
|
68762
|
68763
|
71643
|
71644
|
71645
|
71646
|
71647
|
71648
|
72644
|
72645
|
72646
|
72647
|
72648
|
72649
|
78242
|
78243
|
78244
|
78245
|
78246
|
78247
|
78248
|
78266
|
78305
|
78417
|
78418
|
78419
|
78420
|
78421
|
78422
|
78423
|
78424
|
78425
|
78426
|
78712
|
78713
|
78714
|
78715
|
78716
|
78717
|
78718
|
78719
|
78720
|
78815
|
78816
|
78817
|
78818
|
78819
|
78820
|
78821
|
78822
|
78823
|
81419
|
81420
|
81421
|
81422
|
81423
|
81424
|
81425
|
81426
|
81427
|
81431
|
81449
|
81570
|
81571
|
81572
|
81573
|
81574
|
81575
|
81576
|
81577
|
81578
|
81579
|
81580
|
81581
|
82205
|
82206
|
82207
|
82208
|
82209
|
82210
|
82211
|
82212
|
82213
|
82214
|
82215
|
82216
|
82220
|
82221
|
83331
|
83332
|
83333
|
83334
|
83335
|
83336
|
83337
|
83338
|
83339
|
83340
|
83341
|
83342
|
83378
|
83380
|
83381
|
84541
|
84542
|
84543
|
84544
|
84545
|
84546
|
84547
|
84548
|
84549
|
84550
|
84551
|
84552
|
84553
|
87979
|
87980
|
87981
|
87982
|
87983
|
87984
|
87985
|
87986
|
87987
|
87988
|
87989
|
87990
|
87991
|
117128
|
117129
|
117130
|
117131
|
117132
|
117133
|
120365
|
120366
|
120367
|
120639
|
120640
|
120641
|
121941
|
122098
|
162071
|
162072
|
162073
|
162074
|
163052
|
163053
|
163054
|
163055
|
163092
|
163093
|
166005
|
166006
|
166007
|
166008
|
166009