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 449-456
Link Here
|
449 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> |
443 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> |
450 |
<input type="hidden" name="type" value="str8" /> |
444 |
<input type="hidden" name="type" value="str8" /> |
451 |
|
445 |
|
|
|
446 |
[% FOREACH biblionumber IN biblionumbers %] |
447 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]"/> |
448 |
[% END %] |
452 |
[% IF ( multi_hold ) %] |
449 |
[% IF ( multi_hold ) %] |
453 |
<input type="hidden" name="biblionumbers" id="multi_hold_bibs" value="[% biblionumbers | html %]"/> |
|
|
454 |
<input type="hidden" name="multi_holds" id="multi_holds" value="1" /> |
450 |
<input type="hidden" name="multi_holds" id="multi_holds" value="1" /> |
455 |
<input type="hidden" name="bad_bibs" id="bad_bibs" value=""/> |
451 |
<input type="hidden" name="bad_bibs" id="bad_bibs" value=""/> |
456 |
<input type="hidden" name="request" value="any"/> |
452 |
<input type="hidden" name="request" value="any"/> |
Lines 459-465
Link Here
|
459 |
<input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/> |
455 |
<input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/> |
460 |
[% END %] |
456 |
[% END %] |
461 |
[% ELSE %] |
457 |
[% ELSE %] |
462 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> |
|
|
463 |
<input type="hidden" name="title" value="[% biblio.title | html %]" /> |
458 |
<input type="hidden" name="title" value="[% biblio.title | html %]" /> |
464 |
<input type="hidden" name="rank-request" value="[% fixedRank | html %]" /> |
459 |
<input type="hidden" name="rank-request" value="[% fixedRank | html %]" /> |
465 |
[% END # /IF multi_hold %] |
460 |
[% END # /IF multi_hold %] |
Lines 923-929
Link Here
|
923 |
[% IF ( reserveloop ) %] |
918 |
[% IF ( reserveloop ) %] |
924 |
<form id="existing_holds" name="T[% time | html %]" action="modrequest.pl" method="post" style="display:block"> |
919 |
<form id="existing_holds" name="T[% time | html %]" action="modrequest.pl" method="post" style="display:block"> |
925 |
[% IF ( multi_hold ) %] |
920 |
[% IF ( multi_hold ) %] |
926 |
<input type = "hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> |
921 |
[% FOREACH biblionumber IN biblionumbers %] |
|
|
922 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]"/> |
923 |
[% END %] |
927 |
[% END %] |
924 |
[% END %] |
928 |
|
925 |
|
929 |
[% IF enqueued %] |
926 |
[% IF enqueued %] |
Lines 1154-1160
Link Here
|
1154 |
[% Asset.js("js/holds.js") | $raw%] |
1151 |
[% Asset.js("js/holds.js") | $raw%] |
1155 |
<script> |
1152 |
<script> |
1156 |
var Sticky; |
1153 |
var Sticky; |
1157 |
var biblionumber = "[% biblionumber | $raw %]"; |
1154 |
var biblionumbers = [[% biblionumbers.join(', ') | $raw %]]; |
1158 |
var borrowernumber = "[% patron.borrowernumber | $raw %]"; |
1155 |
var borrowernumber = "[% patron.borrowernumber | $raw %]"; |
1159 |
var patron_homebranch = "[% To.json( Branches.GetName( patron.branchcode ) ) | $raw %]"; |
1156 |
var patron_homebranch = "[% To.json( Branches.GetName( patron.branchcode ) ) | $raw %]"; |
1160 |
var override_items = {[% FOREACH biblio IN biblioloop %][% FOREACH itemloo IN biblio.itemloop %][% IF ( itemloo.override ) %] |
1157 |
var override_items = {[% FOREACH biblio IN biblioloop %][% FOREACH itemloo IN biblio.itemloop %][% IF ( itemloo.override ) %] |
Lines 1220-1226
Link Here
|
1220 |
var pickup = $("#pickup").val(); |
1217 |
var pickup = $("#pickup").val(); |
1221 |
var url = "?pickup=" + pickup; |
1218 |
var url = "?pickup=" + pickup; |
1222 |
url += "&borrowernumber=" + borrowernumber; |
1219 |
url += "&borrowernumber=" + borrowernumber; |
1223 |
url += "&biblionumber=" + biblionumber; |
1220 |
url += "&biblionumber=" + biblionumbers[0]; |
1224 |
window.location.replace(url); |
1221 |
window.location.replace(url); |
1225 |
}); |
1222 |
}); |
1226 |
[% END %] |
1223 |
[% END %] |
Lines 1240-1247
Link Here
|
1240 |
$("#club-request-form").on("submit", function() { |
1237 |
$("#club-request-form").on("submit", function() { |
1241 |
let $t = $(this); |
1238 |
let $t = $(this); |
1242 |
$('.clubalert, .holdalert').addClass('hide'); |
1239 |
$('.clubalert, .holdalert').addClass('hide'); |
1243 |
let biblionumbers = [biblionumber]; |
|
|
1244 |
let biblionumbers_text; |
1245 |
const data = { |
1240 |
const data = { |
1246 |
pickup_library_id: $('select[name="pickup"]').val() |
1241 |
pickup_library_id: $('select[name="pickup"]').val() |
1247 |
}; |
1242 |
}; |
Lines 1257-1268
Link Here
|
1257 |
if($('input[name="default_patron_home"]:checked').length) { |
1252 |
if($('input[name="default_patron_home"]:checked').length) { |
1258 |
data.default_patron_home = 1; |
1253 |
data.default_patron_home = 1; |
1259 |
} |
1254 |
} |
1260 |
if($('input[name="biblionumbers"]').length) { |
|
|
1261 |
biblionumbers_text = $('input[name="biblionumbers"]').val(); |
1262 |
biblionumbers = biblionumbers_text.replace(/\/$/, '').split('/') |
1263 |
} |
1264 |
|
1255 |
|
1265 |
const count = $('input[name="holds_to_place_count"]').length?$('input[name="holds_to_place_count"]').val():1; |
1256 |
const count = $('input[name="holds_to_place_count"]').length?$('input[name="holds_to_place_count"]').val():1; |
|
|
1257 |
var newloc = 'request.pl?'; |
1258 |
biblionumbers.forEach(function (biblionumber) { |
1259 |
newloc += '&biblionumber=' + biblionumber; |
1260 |
}); |
1261 |
|
1266 |
biblionumbers.forEach(function(biblionumber) { |
1262 |
biblionumbers.forEach(function(biblionumber) { |
1267 |
data.biblio_id = biblionumber; |
1263 |
data.biblio_id = biblionumber; |
1268 |
let options = { |
1264 |
let options = { |
Lines 1274-1284
Link Here
|
1274 |
for(let i = 0; i < count; i++) { |
1270 |
for(let i = 0; i < count; i++) { |
1275 |
$.ajax(options) |
1271 |
$.ajax(options) |
1276 |
.then(function(result) { |
1272 |
.then(function(result) { |
1277 |
let url = 'request.pl?biblionumber='+biblionumber; |
1273 |
document.location = newloc; |
1278 |
if(biblionumbers_text) { |
|
|
1279 |
url = 'request.pl?biblionumbers='+biblionumbers_text; |
1280 |
} |
1281 |
document.location = url; |
1282 |
}) |
1274 |
}) |
1283 |
.fail(function(err) { |
1275 |
.fail(function(err) { |
1284 |
var message = err.responseJSON.error; |
1276 |
var message = err.responseJSON.error; |
Lines 1373-1379
Link Here
|
1373 |
|
1365 |
|
1374 |
function checkMultiHold() { |
1366 |
function checkMultiHold() { |
1375 |
|
1367 |
|
1376 |
var biblionumbers = ""; |
|
|
1377 |
var selected_bibs = $(".multi_hold_item_checkbox:checked"); |
1368 |
var selected_bibs = $(".multi_hold_item_checkbox:checked"); |
1378 |
if ( selected_bibs.length > 0 ) { |
1369 |
if ( selected_bibs.length > 0 ) { |
1379 |
// there are biblios selected in the form! |
1370 |
// there are biblios selected in the form! |
Lines 1386-1392
Link Here
|
1386 |
} |
1377 |
} |
1387 |
else { |
1378 |
else { |
1388 |
var bibnum = $(this).attr("title"); |
1379 |
var bibnum = $(this).attr("title"); |
1389 |
biblionumbers += bibnum + "/"; |
|
|
1390 |
} |
1380 |
} |
1391 |
}); |
1381 |
}); |
1392 |
if ( pickup_not_set > 0 ) { |
1382 |
if ( pickup_not_set > 0 ) { |
Lines 1406-1412
Link Here
|
1406 |
badBibs += bibnum + "/"; |
1396 |
badBibs += bibnum + "/"; |
1407 |
}); |
1397 |
}); |
1408 |
|
1398 |
|
1409 |
$("#multi_hold_bibs").val(biblionumbers); |
|
|
1410 |
$("#bad_bibs").val(badBibs); |
1399 |
$("#bad_bibs").val(badBibs); |
1411 |
|
1400 |
|
1412 |
$('#hold-request-form').preventDoubleFormSubmit(); |
1401 |
$('#hold-request-form').preventDoubleFormSubmit(); |