Lines 138-151
Link Here
|
138 |
[% END %] |
138 |
[% END %] |
139 |
</ul> |
139 |
</ul> |
140 |
<div id="holds_patronsearch_pane"> |
140 |
<div id="holds_patronsearch_pane"> |
141 |
<form id="holds_patronsearch" action="request.pl?biblionumbers=[% biblionumbers | html %]" method="post"> |
141 |
<form id="holds_patronsearch" action="request.pl" method="post"> |
142 |
<div class="hint">Enter patron card number or partial name:</div> |
142 |
<div class="hint">Enter patron card number or partial name:</div> |
143 |
<input type="text" size="40" id="patron" class="focus" name="findborrower" autocomplete="off" /> |
143 |
<input type="text" size="40" id="patron" class="focus" name="findborrower" autocomplete="off" /> |
144 |
<input type="submit" value="Search" /> |
144 |
<input type="submit" value="Search" /> |
145 |
[% IF multi_hold %] |
145 |
[% FOREACH biblionumber IN biblionumbers %] |
146 |
<input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> |
146 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]"/> |
147 |
[% ELSE %] |
|
|
148 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> |
149 |
[% END %] |
147 |
[% END %] |
150 |
|
148 |
|
151 |
</form> <!-- /#holds_patronsearch --> |
149 |
</form> <!-- /#holds_patronsearch --> |
Lines 155-168
Link Here
|
155 |
</div> |
153 |
</div> |
156 |
[% IF clubcount %] |
154 |
[% IF clubcount %] |
157 |
<div id="holds_clubsearch_pane"> |
155 |
<div id="holds_clubsearch_pane"> |
158 |
<form id="holds_clubsearch" action="request.pl?biblionumbers=[% biblionumbers | html %]" method="post"> |
156 |
<form id="holds_clubsearch" action="request.pl" method="post"> |
159 |
<div class="hint">Enter club ID or partial name:</div> |
157 |
<div class="hint">Enter club ID or partial name:</div> |
160 |
<input type="text" size="40" id="club" class="focus" name="findclub" autocomplete="off" /> |
158 |
<input type="text" size="40" id="club" class="focus" name="findclub" autocomplete="off" /> |
161 |
<input type="submit" value="Search" /> |
159 |
<input type="submit" value="Search" /> |
162 |
[% IF multi_hold %] |
160 |
[% FOREACH biblionumber IN biblionumbers %] |
163 |
<input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> |
161 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]"/> |
164 |
[% ELSE %] |
|
|
165 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> |
166 |
[% END %] |
162 |
[% END %] |
167 |
|
163 |
|
168 |
</form> <!-- /#holds_patronsearch --> |
164 |
</form> <!-- /#holds_patronsearch --> |
Lines 181-187
Link Here
|
181 |
<form action="/api/v1/clubs/[% club.id | html %]/holds" method="post" name="form" id="club-request-form"> |
177 |
<form action="/api/v1/clubs/[% club.id | html %]/holds" method="post" name="form" id="club-request-form"> |
182 |
|
178 |
|
183 |
[% IF ( multi_hold ) %] |
179 |
[% IF ( multi_hold ) %] |
184 |
<input type="hidden" name="biblionumbers" id="multi_hold_bibs" value="[% biblionumbers | html %]"/> |
|
|
185 |
<input type="hidden" name="bad_bibs" id="bad_bibs" value=""/> |
180 |
<input type="hidden" name="bad_bibs" id="bad_bibs" value=""/> |
186 |
<input type="hidden" name="request" value="any"/> |
181 |
<input type="hidden" name="request" value="any"/> |
187 |
[% FOREACH biblioloo IN biblioloop %] |
182 |
[% FOREACH biblioloo IN biblioloop %] |
Lines 189-195
Link Here
|
189 |
<input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/> |
184 |
<input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/> |
190 |
[% END %] |
185 |
[% END %] |
191 |
[% ELSE %] |
186 |
[% ELSE %] |
192 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> |
|
|
193 |
<input type="hidden" name="title" value="[% biblio.title | html %]" /> |
187 |
<input type="hidden" name="title" value="[% biblio.title | html %]" /> |
194 |
<input type="hidden" name="rank-request" value="[% fixedRank | html %]" /> |
188 |
<input type="hidden" name="rank-request" value="[% fixedRank | html %]" /> |
195 |
[% END # /IF multi_hold %] |
189 |
[% END # /IF multi_hold %] |
Lines 424-431
Link Here
|
424 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> |
418 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> |
425 |
<input type="hidden" name="type" value="str8" /> |
419 |
<input type="hidden" name="type" value="str8" /> |
426 |
|
420 |
|
|
|
421 |
[% FOREACH biblionumber IN biblionumbers %] |
422 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]"/> |
423 |
[% END %] |
427 |
[% IF ( multi_hold ) %] |
424 |
[% IF ( multi_hold ) %] |
428 |
<input type="hidden" name="biblionumbers" id="multi_hold_bibs" value="[% biblionumbers | html %]"/> |
|
|
429 |
<input type="hidden" name="multi_holds" id="multi_holds" value="1" /> |
425 |
<input type="hidden" name="multi_holds" id="multi_holds" value="1" /> |
430 |
<input type="hidden" name="bad_bibs" id="bad_bibs" value=""/> |
426 |
<input type="hidden" name="bad_bibs" id="bad_bibs" value=""/> |
431 |
<input type="hidden" name="request" value="any"/> |
427 |
<input type="hidden" name="request" value="any"/> |
Lines 434-440
Link Here
|
434 |
<input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/> |
430 |
<input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/> |
435 |
[% END %] |
431 |
[% END %] |
436 |
[% ELSE %] |
432 |
[% ELSE %] |
437 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> |
|
|
438 |
<input type="hidden" name="title" value="[% biblio.title | html %]" /> |
433 |
<input type="hidden" name="title" value="[% biblio.title | html %]" /> |
439 |
<input type="hidden" name="rank-request" value="[% fixedRank | html %]" /> |
434 |
<input type="hidden" name="rank-request" value="[% fixedRank | html %]" /> |
440 |
[% END # /IF multi_hold %] |
435 |
[% END # /IF multi_hold %] |
Lines 884-890
Link Here
|
884 |
[% IF ( reserveloop ) %] |
879 |
[% IF ( reserveloop ) %] |
885 |
<form id="existing_holds" name="T[% time | html %]" action="modrequest.pl" method="post" style="display:block"> |
880 |
<form id="existing_holds" name="T[% time | html %]" action="modrequest.pl" method="post" style="display:block"> |
886 |
[% IF ( multi_hold ) %] |
881 |
[% IF ( multi_hold ) %] |
887 |
<input type = "hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> |
882 |
[% FOREACH biblionumber IN biblionumbers %] |
|
|
883 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]"/> |
884 |
[% END %] |
888 |
[% END %] |
885 |
[% END %] |
889 |
|
886 |
|
890 |
<h2>Existing holds</h2> |
887 |
<h2>Existing holds</h2> |
Lines 1071-1077
Link Here
|
1071 |
[% INCLUDE 'select2.inc' %] |
1068 |
[% INCLUDE 'select2.inc' %] |
1072 |
<script> |
1069 |
<script> |
1073 |
var Sticky; |
1070 |
var Sticky; |
1074 |
var biblionumber = "[% biblionumber | $raw %]"; |
1071 |
var biblionumbers = [[% biblionumbers.join(', ') | $raw %]]; |
1075 |
var borrowernumber = "[% patron.borrowernumber | $raw %]"; |
1072 |
var borrowernumber = "[% patron.borrowernumber | $raw %]"; |
1076 |
var patron_homebranch = "[% To.json( Branches.GetName( patron.branchcode ) ) | $raw %]"; |
1073 |
var patron_homebranch = "[% To.json( Branches.GetName( patron.branchcode ) ) | $raw %]"; |
1077 |
var override_items = {[% FOREACH bibitemloo IN bibitemloop %][% FOREACH itemloo IN bibitemloo.itemloop %][% IF ( itemloo.override ) %] |
1074 |
var override_items = {[% FOREACH bibitemloo IN bibitemloop %][% FOREACH itemloo IN bibitemloo.itemloop %][% IF ( itemloo.override ) %] |
Lines 1135-1141
Link Here
|
1135 |
var pickup = $("#pickup").val(); |
1132 |
var pickup = $("#pickup").val(); |
1136 |
var url = "?pickup=" + pickup; |
1133 |
var url = "?pickup=" + pickup; |
1137 |
url += "&borrowernumber=" + borrowernumber; |
1134 |
url += "&borrowernumber=" + borrowernumber; |
1138 |
url += "&biblionumber=" + biblionumber; |
1135 |
url += "&biblionumber=" + biblionumbers[0]; |
1139 |
window.location.replace(url); |
1136 |
window.location.replace(url); |
1140 |
}); |
1137 |
}); |
1141 |
[% END %] |
1138 |
[% END %] |
Lines 1165-1172
Link Here
|
1165 |
$("#club-request-form").on("submit", function() { |
1162 |
$("#club-request-form").on("submit", function() { |
1166 |
let $t = $(this); |
1163 |
let $t = $(this); |
1167 |
$('.clubalert, .holdalert').addClass('hide'); |
1164 |
$('.clubalert, .holdalert').addClass('hide'); |
1168 |
let biblionumbers = [biblionumber]; |
|
|
1169 |
let biblionumbers_text; |
1170 |
const data = { |
1165 |
const data = { |
1171 |
pickup_library_id: $('select[name="pickup"]').val() |
1166 |
pickup_library_id: $('select[name="pickup"]').val() |
1172 |
}; |
1167 |
}; |
Lines 1186-1197
Link Here
|
1186 |
if($('input[name="default_patron_home"]:checked').length) { |
1181 |
if($('input[name="default_patron_home"]:checked').length) { |
1187 |
data.default_patron_home = 1; |
1182 |
data.default_patron_home = 1; |
1188 |
} |
1183 |
} |
1189 |
if($('input[name="biblionumbers"]').length) { |
|
|
1190 |
biblionumbers_text = $('input[name="biblionumbers"]').val(); |
1191 |
biblionumbers = biblionumbers_text.replace(/\/$/, '').split('/') |
1192 |
} |
1193 |
|
1184 |
|
1194 |
const count = $('input[name="holds_to_place_count"]').length?$('input[name="holds_to_place_count"]').val():1; |
1185 |
const count = $('input[name="holds_to_place_count"]').length?$('input[name="holds_to_place_count"]').val():1; |
|
|
1186 |
var newloc = 'request.pl?'; |
1187 |
biblionumbers.forEach(function (biblionumber) { |
1188 |
newloc += '&biblionumber=' + biblionumber; |
1189 |
}); |
1190 |
|
1195 |
biblionumbers.forEach(function(biblionumber) { |
1191 |
biblionumbers.forEach(function(biblionumber) { |
1196 |
data.biblio_id = biblionumber; |
1192 |
data.biblio_id = biblionumber; |
1197 |
let options = { |
1193 |
let options = { |
Lines 1203-1213
Link Here
|
1203 |
for(let i = 0; i < count; i++) { |
1199 |
for(let i = 0; i < count; i++) { |
1204 |
$.ajax(options) |
1200 |
$.ajax(options) |
1205 |
.then(function(result) { |
1201 |
.then(function(result) { |
1206 |
let url = 'request.pl?biblionumber='+biblionumber; |
1202 |
document.location = newloc; |
1207 |
if(biblionumbers_text) { |
|
|
1208 |
url = 'request.pl?biblionumbers='+biblionumbers_text; |
1209 |
} |
1210 |
document.location = url; |
1211 |
}) |
1203 |
}) |
1212 |
.fail(function(err) { |
1204 |
.fail(function(err) { |
1213 |
var message = err.responseJSON.error; |
1205 |
var message = err.responseJSON.error; |
Lines 1418-1424
Link Here
|
1418 |
|
1410 |
|
1419 |
function checkMultiHold() { |
1411 |
function checkMultiHold() { |
1420 |
|
1412 |
|
1421 |
var biblionumbers = ""; |
|
|
1422 |
var selected_bibs = $(".multi_hold_item_checkbox:checked"); |
1413 |
var selected_bibs = $(".multi_hold_item_checkbox:checked"); |
1423 |
if ( selected_bibs.length > 0 ) { |
1414 |
if ( selected_bibs.length > 0 ) { |
1424 |
// there are biblios selected in the form! |
1415 |
// there are biblios selected in the form! |
Lines 1431-1437
Link Here
|
1431 |
} |
1422 |
} |
1432 |
else { |
1423 |
else { |
1433 |
var bibnum = $(this).attr("title"); |
1424 |
var bibnum = $(this).attr("title"); |
1434 |
biblionumbers += bibnum + "/"; |
|
|
1435 |
} |
1425 |
} |
1436 |
}); |
1426 |
}); |
1437 |
if ( pickup_not_set > 0 ) { |
1427 |
if ( pickup_not_set > 0 ) { |
Lines 1451-1457
Link Here
|
1451 |
badBibs += bibnum + "/"; |
1441 |
badBibs += bibnum + "/"; |
1452 |
}); |
1442 |
}); |
1453 |
|
1443 |
|
1454 |
$("#multi_hold_bibs").val(biblionumbers); |
|
|
1455 |
$("#bad_bibs").val(badBibs); |
1444 |
$("#bad_bibs").val(badBibs); |
1456 |
|
1445 |
|
1457 |
$('#hold-request-form').preventDoubleFormSubmit(); |
1446 |
$('#hold-request-form').preventDoubleFormSubmit(); |