|
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 880-886
Link Here
|
| 880 |
[% IF ( reserveloop ) %] |
875 |
[% IF ( reserveloop ) %] |
| 881 |
<form id="existing_holds" name="T[% time | html %]" action="modrequest.pl" method="post" style="display:block"> |
876 |
<form id="existing_holds" name="T[% time | html %]" action="modrequest.pl" method="post" style="display:block"> |
| 882 |
[% IF ( multi_hold ) %] |
877 |
[% IF ( multi_hold ) %] |
| 883 |
<input type = "hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> |
878 |
[% FOREACH biblionumber IN biblionumbers %] |
|
|
879 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]"/> |
| 880 |
[% END %] |
| 884 |
[% END %] |
881 |
[% END %] |
| 885 |
|
882 |
|
| 886 |
[% IF enqueued %] |
883 |
[% IF enqueued %] |
|
Lines 1074-1080
Link Here
|
| 1074 |
[% INCLUDE 'select2.inc' %] |
1071 |
[% INCLUDE 'select2.inc' %] |
| 1075 |
<script> |
1072 |
<script> |
| 1076 |
var Sticky; |
1073 |
var Sticky; |
| 1077 |
var biblionumber = "[% biblionumber | $raw %]"; |
1074 |
var biblionumbers = [[% biblionumbers.join(', ') | $raw %]]; |
| 1078 |
var borrowernumber = "[% patron.borrowernumber | $raw %]"; |
1075 |
var borrowernumber = "[% patron.borrowernumber | $raw %]"; |
| 1079 |
var patron_homebranch = "[% To.json( Branches.GetName( patron.branchcode ) ) | $raw %]"; |
1076 |
var patron_homebranch = "[% To.json( Branches.GetName( patron.branchcode ) ) | $raw %]"; |
| 1080 |
var override_items = {[% FOREACH bibitemloo IN bibitemloop %][% FOREACH itemloo IN bibitemloo.itemloop %][% IF ( itemloo.override ) %] |
1077 |
var override_items = {[% FOREACH bibitemloo IN bibitemloop %][% FOREACH itemloo IN bibitemloo.itemloop %][% IF ( itemloo.override ) %] |
|
Lines 1140-1146
Link Here
|
| 1140 |
var pickup = $("#pickup").val(); |
1137 |
var pickup = $("#pickup").val(); |
| 1141 |
var url = "?pickup=" + pickup; |
1138 |
var url = "?pickup=" + pickup; |
| 1142 |
url += "&borrowernumber=" + borrowernumber; |
1139 |
url += "&borrowernumber=" + borrowernumber; |
| 1143 |
url += "&biblionumber=" + biblionumber; |
1140 |
url += "&biblionumber=" + biblionumbers[0]; |
| 1144 |
window.location.replace(url); |
1141 |
window.location.replace(url); |
| 1145 |
}); |
1142 |
}); |
| 1146 |
[% END %] |
1143 |
[% END %] |
|
Lines 1167-1174
Link Here
|
| 1167 |
$("#club-request-form").on("submit", function() { |
1164 |
$("#club-request-form").on("submit", function() { |
| 1168 |
let $t = $(this); |
1165 |
let $t = $(this); |
| 1169 |
$('.clubalert, .holdalert').addClass('hide'); |
1166 |
$('.clubalert, .holdalert').addClass('hide'); |
| 1170 |
let biblionumbers = [biblionumber]; |
|
|
| 1171 |
let biblionumbers_text; |
| 1172 |
const data = { |
1167 |
const data = { |
| 1173 |
pickup_library_id: $('select[name="pickup"]').val() |
1168 |
pickup_library_id: $('select[name="pickup"]').val() |
| 1174 |
}; |
1169 |
}; |
|
Lines 1184-1195
Link Here
|
| 1184 |
if($('input[name="default_patron_home"]:checked').length) { |
1179 |
if($('input[name="default_patron_home"]:checked').length) { |
| 1185 |
data.default_patron_home = 1; |
1180 |
data.default_patron_home = 1; |
| 1186 |
} |
1181 |
} |
| 1187 |
if($('input[name="biblionumbers"]').length) { |
|
|
| 1188 |
biblionumbers_text = $('input[name="biblionumbers"]').val(); |
| 1189 |
biblionumbers = biblionumbers_text.replace(/\/$/, '').split('/') |
| 1190 |
} |
| 1191 |
|
1182 |
|
| 1192 |
const count = $('input[name="holds_to_place_count"]').length?$('input[name="holds_to_place_count"]').val():1; |
1183 |
const count = $('input[name="holds_to_place_count"]').length?$('input[name="holds_to_place_count"]').val():1; |
|
|
1184 |
var newloc = 'request.pl?'; |
| 1185 |
biblionumbers.forEach(function (biblionumber) { |
| 1186 |
newloc += '&biblionumber=' + biblionumber; |
| 1187 |
}); |
| 1188 |
|
| 1193 |
biblionumbers.forEach(function(biblionumber) { |
1189 |
biblionumbers.forEach(function(biblionumber) { |
| 1194 |
data.biblio_id = biblionumber; |
1190 |
data.biblio_id = biblionumber; |
| 1195 |
let options = { |
1191 |
let options = { |
|
Lines 1201-1211
Link Here
|
| 1201 |
for(let i = 0; i < count; i++) { |
1197 |
for(let i = 0; i < count; i++) { |
| 1202 |
$.ajax(options) |
1198 |
$.ajax(options) |
| 1203 |
.then(function(result) { |
1199 |
.then(function(result) { |
| 1204 |
let url = 'request.pl?biblionumber='+biblionumber; |
1200 |
document.location = newloc; |
| 1205 |
if(biblionumbers_text) { |
|
|
| 1206 |
url = 'request.pl?biblionumbers='+biblionumbers_text; |
| 1207 |
} |
| 1208 |
document.location = url; |
| 1209 |
}) |
1201 |
}) |
| 1210 |
.fail(function(err) { |
1202 |
.fail(function(err) { |
| 1211 |
var message = err.responseJSON.error; |
1203 |
var message = err.responseJSON.error; |
|
Lines 1416-1422
Link Here
|
| 1416 |
|
1408 |
|
| 1417 |
function checkMultiHold() { |
1409 |
function checkMultiHold() { |
| 1418 |
|
1410 |
|
| 1419 |
var biblionumbers = ""; |
|
|
| 1420 |
var selected_bibs = $(".multi_hold_item_checkbox:checked"); |
1411 |
var selected_bibs = $(".multi_hold_item_checkbox:checked"); |
| 1421 |
if ( selected_bibs.length > 0 ) { |
1412 |
if ( selected_bibs.length > 0 ) { |
| 1422 |
// there are biblios selected in the form! |
1413 |
// there are biblios selected in the form! |
|
Lines 1429-1435
Link Here
|
| 1429 |
} |
1420 |
} |
| 1430 |
else { |
1421 |
else { |
| 1431 |
var bibnum = $(this).attr("title"); |
1422 |
var bibnum = $(this).attr("title"); |
| 1432 |
biblionumbers += bibnum + "/"; |
|
|
| 1433 |
} |
1423 |
} |
| 1434 |
}); |
1424 |
}); |
| 1435 |
if ( pickup_not_set > 0 ) { |
1425 |
if ( pickup_not_set > 0 ) { |
|
Lines 1449-1455
Link Here
|
| 1449 |
badBibs += bibnum + "/"; |
1439 |
badBibs += bibnum + "/"; |
| 1450 |
}); |
1440 |
}); |
| 1451 |
|
1441 |
|
| 1452 |
$("#multi_hold_bibs").val(biblionumbers); |
|
|
| 1453 |
$("#bad_bibs").val(badBibs); |
1442 |
$("#bad_bibs").val(badBibs); |
| 1454 |
|
1443 |
|
| 1455 |
$('#hold-request-form').preventDoubleFormSubmit(); |
1444 |
$('#hold-request-form').preventDoubleFormSubmit(); |