Lines 163-176
Link Here
|
163 |
[% END %] |
163 |
[% END %] |
164 |
</ul> |
164 |
</ul> |
165 |
<div id="holds_patronsearch_pane"> |
165 |
<div id="holds_patronsearch_pane"> |
166 |
<form id="holds_patronsearch" action="request.pl?biblionumbers=[% biblionumbers | html %]" method="post"> |
166 |
<form id="holds_patronsearch" action="request.pl" method="post"> |
167 |
<div class="hint">Enter patron card number or partial name:</div> |
167 |
<div class="hint">Enter patron card number or partial name:</div> |
168 |
<input type="text" size="40" id="patron" class="focus" name="findborrower" autocomplete="off" /> |
168 |
<input type="text" size="40" id="patron" class="focus" name="findborrower" autocomplete="off" /> |
169 |
<input type="submit" value="Search" /> |
169 |
<input type="submit" value="Search" /> |
170 |
[% IF multi_hold %] |
170 |
[% FOREACH biblionumber IN biblionumbers %] |
171 |
<input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> |
171 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]"/> |
172 |
[% ELSE %] |
|
|
173 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> |
174 |
[% END %] |
172 |
[% END %] |
175 |
|
173 |
|
176 |
</form> <!-- /#holds_patronsearch --> |
174 |
</form> <!-- /#holds_patronsearch --> |
Lines 180-193
Link Here
|
180 |
</div> |
178 |
</div> |
181 |
[% IF clubcount %] |
179 |
[% IF clubcount %] |
182 |
<div id="holds_clubsearch_pane"> |
180 |
<div id="holds_clubsearch_pane"> |
183 |
<form id="holds_clubsearch" action="request.pl?biblionumbers=[% biblionumbers | html %]" method="post"> |
181 |
<form id="holds_clubsearch" action="request.pl" method="post"> |
184 |
<div class="hint">Enter club ID or partial name:</div> |
182 |
<div class="hint">Enter club ID or partial name:</div> |
185 |
<input type="text" size="40" id="club" class="focus" name="findclub" autocomplete="off" /> |
183 |
<input type="text" size="40" id="club" class="focus" name="findclub" autocomplete="off" /> |
186 |
<input type="submit" value="Search" /> |
184 |
<input type="submit" value="Search" /> |
187 |
[% IF multi_hold %] |
185 |
[% FOREACH biblionumber IN biblionumbers %] |
188 |
<input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> |
186 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]"/> |
189 |
[% ELSE %] |
|
|
190 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> |
191 |
[% END %] |
187 |
[% END %] |
192 |
|
188 |
|
193 |
</form> <!-- /#holds_patronsearch --> |
189 |
</form> <!-- /#holds_patronsearch --> |
Lines 206-212
Link Here
|
206 |
<form action="/api/v1/clubs/[% club.id | html %]/holds" method="post" name="form" id="club-request-form"> |
202 |
<form action="/api/v1/clubs/[% club.id | html %]/holds" method="post" name="form" id="club-request-form"> |
207 |
|
203 |
|
208 |
[% IF ( multi_hold ) %] |
204 |
[% IF ( multi_hold ) %] |
209 |
<input type="hidden" name="biblionumbers" id="multi_hold_bibs" value="[% biblionumbers | html %]"/> |
|
|
210 |
<input type="hidden" name="bad_bibs" id="bad_bibs" value=""/> |
205 |
<input type="hidden" name="bad_bibs" id="bad_bibs" value=""/> |
211 |
<input type="hidden" name="request" value="any"/> |
206 |
<input type="hidden" name="request" value="any"/> |
212 |
[% FOREACH biblioloo IN biblioloop %] |
207 |
[% FOREACH biblioloo IN biblioloop %] |
Lines 214-220
Link Here
|
214 |
<input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/> |
209 |
<input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/> |
215 |
[% END %] |
210 |
[% END %] |
216 |
[% ELSE %] |
211 |
[% ELSE %] |
217 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> |
|
|
218 |
<input type="hidden" name="title" value="[% biblio.title | html %]" /> |
212 |
<input type="hidden" name="title" value="[% biblio.title | html %]" /> |
219 |
<input type="hidden" name="rank-request" value="[% fixedRank | html %]" /> |
213 |
<input type="hidden" name="rank-request" value="[% fixedRank | html %]" /> |
220 |
[% END # /IF multi_hold %] |
214 |
[% END # /IF multi_hold %] |
Lines 448-455
Link Here
|
448 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> |
442 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> |
449 |
<input type="hidden" name="type" value="str8" /> |
443 |
<input type="hidden" name="type" value="str8" /> |
450 |
|
444 |
|
|
|
445 |
[% FOREACH biblionumber IN biblionumbers %] |
446 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]"/> |
447 |
[% END %] |
451 |
[% IF ( multi_hold ) %] |
448 |
[% IF ( multi_hold ) %] |
452 |
<input type="hidden" name="biblionumbers" id="multi_hold_bibs" value="[% biblionumbers | html %]"/> |
|
|
453 |
<input type="hidden" name="multi_holds" id="multi_holds" value="1" /> |
449 |
<input type="hidden" name="multi_holds" id="multi_holds" value="1" /> |
454 |
<input type="hidden" name="bad_bibs" id="bad_bibs" value=""/> |
450 |
<input type="hidden" name="bad_bibs" id="bad_bibs" value=""/> |
455 |
<input type="hidden" name="request" value="any"/> |
451 |
<input type="hidden" name="request" value="any"/> |
Lines 458-464
Link Here
|
458 |
<input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/> |
454 |
<input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/> |
459 |
[% END %] |
455 |
[% END %] |
460 |
[% ELSE %] |
456 |
[% ELSE %] |
461 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> |
|
|
462 |
<input type="hidden" name="title" value="[% biblio.title | html %]" /> |
457 |
<input type="hidden" name="title" value="[% biblio.title | html %]" /> |
463 |
<input type="hidden" name="rank-request" value="[% fixedRank | html %]" /> |
458 |
<input type="hidden" name="rank-request" value="[% fixedRank | html %]" /> |
464 |
[% END # /IF multi_hold %] |
459 |
[% END # /IF multi_hold %] |
Lines 921-927
Link Here
|
921 |
[% IF ( reserveloop ) %] |
916 |
[% IF ( reserveloop ) %] |
922 |
<form id="existing_holds" name="T[% time | html %]" action="modrequest.pl" method="post" style="display:block"> |
917 |
<form id="existing_holds" name="T[% time | html %]" action="modrequest.pl" method="post" style="display:block"> |
923 |
[% IF ( multi_hold ) %] |
918 |
[% IF ( multi_hold ) %] |
924 |
<input type = "hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> |
919 |
[% FOREACH biblionumber IN biblionumbers %] |
|
|
920 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]"/> |
921 |
[% END %] |
925 |
[% END %] |
922 |
[% END %] |
926 |
|
923 |
|
927 |
[% IF enqueued %] |
924 |
[% IF enqueued %] |
Lines 1152-1158
Link Here
|
1152 |
[% Asset.js("js/holds.js") | $raw%] |
1149 |
[% Asset.js("js/holds.js") | $raw%] |
1153 |
<script> |
1150 |
<script> |
1154 |
var Sticky; |
1151 |
var Sticky; |
1155 |
var biblionumber = "[% biblionumber | $raw %]"; |
1152 |
var biblionumbers = [[% biblionumbers.join(', ') | $raw %]]; |
1156 |
var borrowernumber = "[% patron.borrowernumber | $raw %]"; |
1153 |
var borrowernumber = "[% patron.borrowernumber | $raw %]"; |
1157 |
var patron_homebranch = "[% To.json( Branches.GetName( patron.branchcode ) ) | $raw %]"; |
1154 |
var patron_homebranch = "[% To.json( Branches.GetName( patron.branchcode ) ) | $raw %]"; |
1158 |
var override_items = {[% FOREACH biblio IN biblioloop %][% FOREACH itemloo IN biblio.itemloop %][% IF ( itemloo.override ) %] |
1155 |
var override_items = {[% FOREACH biblio IN biblioloop %][% FOREACH itemloo IN biblio.itemloop %][% IF ( itemloo.override ) %] |
Lines 1218-1224
Link Here
|
1218 |
var pickup = $("#pickup").val(); |
1215 |
var pickup = $("#pickup").val(); |
1219 |
var url = "?pickup=" + pickup; |
1216 |
var url = "?pickup=" + pickup; |
1220 |
url += "&borrowernumber=" + borrowernumber; |
1217 |
url += "&borrowernumber=" + borrowernumber; |
1221 |
url += "&biblionumber=" + biblionumber; |
1218 |
url += "&biblionumber=" + biblionumbers[0]; |
1222 |
window.location.replace(url); |
1219 |
window.location.replace(url); |
1223 |
}); |
1220 |
}); |
1224 |
[% END %] |
1221 |
[% END %] |
Lines 1238-1245
Link Here
|
1238 |
$("#club-request-form").on("submit", function() { |
1235 |
$("#club-request-form").on("submit", function() { |
1239 |
let $t = $(this); |
1236 |
let $t = $(this); |
1240 |
$('.clubalert, .holdalert').addClass('hide'); |
1237 |
$('.clubalert, .holdalert').addClass('hide'); |
1241 |
let biblionumbers = [biblionumber]; |
|
|
1242 |
let biblionumbers_text; |
1243 |
const data = { |
1238 |
const data = { |
1244 |
pickup_library_id: $('select[name="pickup"]').val() |
1239 |
pickup_library_id: $('select[name="pickup"]').val() |
1245 |
}; |
1240 |
}; |
Lines 1255-1266
Link Here
|
1255 |
if($('input[name="default_patron_home"]:checked').length) { |
1250 |
if($('input[name="default_patron_home"]:checked').length) { |
1256 |
data.default_patron_home = 1; |
1251 |
data.default_patron_home = 1; |
1257 |
} |
1252 |
} |
1258 |
if($('input[name="biblionumbers"]').length) { |
|
|
1259 |
biblionumbers_text = $('input[name="biblionumbers"]').val(); |
1260 |
biblionumbers = biblionumbers_text.replace(/\/$/, '').split('/') |
1261 |
} |
1262 |
|
1253 |
|
1263 |
const count = $('input[name="holds_to_place_count"]').length?$('input[name="holds_to_place_count"]').val():1; |
1254 |
const count = $('input[name="holds_to_place_count"]').length?$('input[name="holds_to_place_count"]').val():1; |
|
|
1255 |
var newloc = 'request.pl?'; |
1256 |
biblionumbers.forEach(function (biblionumber) { |
1257 |
newloc += '&biblionumber=' + biblionumber; |
1258 |
}); |
1259 |
|
1264 |
biblionumbers.forEach(function(biblionumber) { |
1260 |
biblionumbers.forEach(function(biblionumber) { |
1265 |
data.biblio_id = biblionumber; |
1261 |
data.biblio_id = biblionumber; |
1266 |
let options = { |
1262 |
let options = { |
Lines 1272-1282
Link Here
|
1272 |
for(let i = 0; i < count; i++) { |
1268 |
for(let i = 0; i < count; i++) { |
1273 |
$.ajax(options) |
1269 |
$.ajax(options) |
1274 |
.then(function(result) { |
1270 |
.then(function(result) { |
1275 |
let url = 'request.pl?biblionumber='+biblionumber; |
1271 |
document.location = newloc; |
1276 |
if(biblionumbers_text) { |
|
|
1277 |
url = 'request.pl?biblionumbers='+biblionumbers_text; |
1278 |
} |
1279 |
document.location = url; |
1280 |
}) |
1272 |
}) |
1281 |
.fail(function(err) { |
1273 |
.fail(function(err) { |
1282 |
var message = err.responseJSON.error; |
1274 |
var message = err.responseJSON.error; |
Lines 1371-1377
Link Here
|
1371 |
|
1363 |
|
1372 |
function checkMultiHold() { |
1364 |
function checkMultiHold() { |
1373 |
|
1365 |
|
1374 |
var biblionumbers = ""; |
|
|
1375 |
var selected_bibs = $(".multi_hold_item_checkbox:checked"); |
1366 |
var selected_bibs = $(".multi_hold_item_checkbox:checked"); |
1376 |
if ( selected_bibs.length > 0 ) { |
1367 |
if ( selected_bibs.length > 0 ) { |
1377 |
// there are biblios selected in the form! |
1368 |
// there are biblios selected in the form! |
Lines 1384-1390
Link Here
|
1384 |
} |
1375 |
} |
1385 |
else { |
1376 |
else { |
1386 |
var bibnum = $(this).attr("title"); |
1377 |
var bibnum = $(this).attr("title"); |
1387 |
biblionumbers += bibnum + "/"; |
|
|
1388 |
} |
1378 |
} |
1389 |
}); |
1379 |
}); |
1390 |
if ( pickup_not_set > 0 ) { |
1380 |
if ( pickup_not_set > 0 ) { |
Lines 1404-1410
Link Here
|
1404 |
badBibs += bibnum + "/"; |
1394 |
badBibs += bibnum + "/"; |
1405 |
}); |
1395 |
}); |
1406 |
|
1396 |
|
1407 |
$("#multi_hold_bibs").val(biblionumbers); |
|
|
1408 |
$("#bad_bibs").val(badBibs); |
1397 |
$("#bad_bibs").val(badBibs); |
1409 |
|
1398 |
|
1410 |
$('#hold-request-form').preventDoubleFormSubmit(); |
1399 |
$('#hold-request-form').preventDoubleFormSubmit(); |