|
Lines 127-140
Link Here
|
| 127 |
[% END %] |
127 |
[% END %] |
| 128 |
</ul> |
128 |
</ul> |
| 129 |
<div id="holds_patronsearch_pane"> |
129 |
<div id="holds_patronsearch_pane"> |
| 130 |
<form id="holds_patronsearch" action="request.pl?biblionumbers=[% biblionumbers | html %]" method="post"> |
130 |
<form id="holds_patronsearch" action="request.pl" method="post"> |
| 131 |
<div class="hint">Enter patron card number or partial name:</div> |
131 |
<div class="hint">Enter patron card number or partial name:</div> |
| 132 |
<input type="text" size="40" id="patron" class="focus" name="findborrower" autocomplete="off" /> |
132 |
<input type="text" size="40" id="patron" class="focus" name="findborrower" autocomplete="off" /> |
| 133 |
<input type="submit" value="Search" /> |
133 |
<input type="submit" value="Search" /> |
| 134 |
[% IF multi_hold %] |
134 |
[% FOREACH biblionumber IN biblionumbers %] |
| 135 |
<input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> |
135 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]"/> |
| 136 |
[% ELSE %] |
|
|
| 137 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> |
| 138 |
[% END %] |
136 |
[% END %] |
| 139 |
|
137 |
|
| 140 |
</form> <!-- /#holds_patronsearch --> |
138 |
</form> <!-- /#holds_patronsearch --> |
|
Lines 144-157
Link Here
|
| 144 |
</div> |
142 |
</div> |
| 145 |
[% IF clubcount %] |
143 |
[% IF clubcount %] |
| 146 |
<div id="holds_clubsearch_pane"> |
144 |
<div id="holds_clubsearch_pane"> |
| 147 |
<form id="holds_clubsearch" action="request.pl?biblionumbers=[% biblionumbers | html %]" method="post"> |
145 |
<form id="holds_clubsearch" action="request.pl" method="post"> |
| 148 |
<div class="hint">Enter club ID or partial name:</div> |
146 |
<div class="hint">Enter club ID or partial name:</div> |
| 149 |
<input type="text" size="40" id="club" class="focus" name="findclub" autocomplete="off" /> |
147 |
<input type="text" size="40" id="club" class="focus" name="findclub" autocomplete="off" /> |
| 150 |
<input type="submit" value="Search" /> |
148 |
<input type="submit" value="Search" /> |
| 151 |
[% IF multi_hold %] |
149 |
[% FOREACH biblionumber IN biblionumbers %] |
| 152 |
<input type="hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> |
150 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]"/> |
| 153 |
[% ELSE %] |
|
|
| 154 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> |
| 155 |
[% END %] |
151 |
[% END %] |
| 156 |
|
152 |
|
| 157 |
</form> <!-- /#holds_patronsearch --> |
153 |
</form> <!-- /#holds_patronsearch --> |
|
Lines 170-176
Link Here
|
| 170 |
<form action="/api/v1/clubs/[% club.id | html %]/holds" method="post" name="form" id="club-request-form"> |
166 |
<form action="/api/v1/clubs/[% club.id | html %]/holds" method="post" name="form" id="club-request-form"> |
| 171 |
|
167 |
|
| 172 |
[% IF ( multi_hold ) %] |
168 |
[% IF ( multi_hold ) %] |
| 173 |
<input type="hidden" name="biblionumbers" id="multi_hold_bibs" value="[% biblionumbers | html %]"/> |
|
|
| 174 |
<input type="hidden" name="bad_bibs" id="bad_bibs" value=""/> |
169 |
<input type="hidden" name="bad_bibs" id="bad_bibs" value=""/> |
| 175 |
<input type="hidden" name="request" value="any"/> |
170 |
<input type="hidden" name="request" value="any"/> |
| 176 |
[% FOREACH biblioloo IN biblioloop %] |
171 |
[% FOREACH biblioloo IN biblioloop %] |
|
Lines 178-184
Link Here
|
| 178 |
<input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/> |
173 |
<input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/> |
| 179 |
[% END %] |
174 |
[% END %] |
| 180 |
[% ELSE %] |
175 |
[% ELSE %] |
| 181 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> |
|
|
| 182 |
<input type="hidden" name="title" value="[% biblio.title | html %]" /> |
176 |
<input type="hidden" name="title" value="[% biblio.title | html %]" /> |
| 183 |
<input type="hidden" name="rank-request" value="[% fixedRank | html %]" /> |
177 |
<input type="hidden" name="rank-request" value="[% fixedRank | html %]" /> |
| 184 |
[% END # /IF multi_hold %] |
178 |
[% END # /IF multi_hold %] |
|
Lines 413-420
Link Here
|
| 413 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> |
407 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> |
| 414 |
<input type="hidden" name="type" value="str8" /> |
408 |
<input type="hidden" name="type" value="str8" /> |
| 415 |
|
409 |
|
|
|
410 |
[% FOREACH biblionumber IN biblionumbers %] |
| 411 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]"/> |
| 412 |
[% END %] |
| 416 |
[% IF ( multi_hold ) %] |
413 |
[% IF ( multi_hold ) %] |
| 417 |
<input type="hidden" name="biblionumbers" id="multi_hold_bibs" value="[% biblionumbers | html %]"/> |
|
|
| 418 |
<input type="hidden" name="multi_holds" id="multi_holds" value="1" /> |
414 |
<input type="hidden" name="multi_holds" id="multi_holds" value="1" /> |
| 419 |
<input type="hidden" name="bad_bibs" id="bad_bibs" value=""/> |
415 |
<input type="hidden" name="bad_bibs" id="bad_bibs" value=""/> |
| 420 |
<input type="hidden" name="request" value="any"/> |
416 |
<input type="hidden" name="request" value="any"/> |
|
Lines 423-429
Link Here
|
| 423 |
<input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/> |
419 |
<input type="hidden" name="rank_[% biblioloo.biblionumber | html %]" value="[% biblioloo.rank | html %]"/> |
| 424 |
[% END %] |
420 |
[% END %] |
| 425 |
[% ELSE %] |
421 |
[% ELSE %] |
| 426 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]" /> |
|
|
| 427 |
<input type="hidden" name="title" value="[% biblio.title | html %]" /> |
422 |
<input type="hidden" name="title" value="[% biblio.title | html %]" /> |
| 428 |
<input type="hidden" name="rank-request" value="[% fixedRank | html %]" /> |
423 |
<input type="hidden" name="rank-request" value="[% fixedRank | html %]" /> |
| 429 |
[% END # /IF multi_hold %] |
424 |
[% END # /IF multi_hold %] |
|
Lines 871-877
Link Here
|
| 871 |
[% IF ( reserveloop ) %] |
866 |
[% IF ( reserveloop ) %] |
| 872 |
<form id="existing_holds" name="T[% time | html %]" action="modrequest.pl" method="post" style="display:block"> |
867 |
<form id="existing_holds" name="T[% time | html %]" action="modrequest.pl" method="post" style="display:block"> |
| 873 |
[% IF ( multi_hold ) %] |
868 |
[% IF ( multi_hold ) %] |
| 874 |
<input type = "hidden" name="biblionumbers" value="[% biblionumbers | html %]"/> |
869 |
[% FOREACH biblionumber IN biblionumbers %] |
|
|
870 |
<input type="hidden" name="biblionumber" value="[% biblionumber | html %]"/> |
| 871 |
[% END %] |
| 875 |
[% END %] |
872 |
[% END %] |
| 876 |
|
873 |
|
| 877 |
<h2>Existing holds</h2> |
874 |
<h2>Existing holds</h2> |
|
Lines 1058-1064
Link Here
|
| 1058 |
[% INCLUDE 'select2.inc' %] |
1055 |
[% INCLUDE 'select2.inc' %] |
| 1059 |
<script> |
1056 |
<script> |
| 1060 |
var Sticky; |
1057 |
var Sticky; |
| 1061 |
var biblionumber = "[% biblionumber | $raw %]"; |
1058 |
var biblionumbers = [[% biblionumbers.join(', ') | $raw %]]; |
| 1062 |
var borrowernumber = "[% patron.borrowernumber | $raw %]"; |
1059 |
var borrowernumber = "[% patron.borrowernumber | $raw %]"; |
| 1063 |
var patron_homebranch = "[% To.json( Branches.GetName( patron.branchcode ) ) | $raw %]"; |
1060 |
var patron_homebranch = "[% To.json( Branches.GetName( patron.branchcode ) ) | $raw %]"; |
| 1064 |
var override_items = {[% FOREACH bibitemloo IN bibitemloop %][% FOREACH itemloo IN bibitemloo.itemloop %][% IF ( itemloo.override ) %] |
1061 |
var override_items = {[% FOREACH bibitemloo IN bibitemloop %][% FOREACH itemloo IN bibitemloo.itemloop %][% IF ( itemloo.override ) %] |
|
Lines 1122-1128
Link Here
|
| 1122 |
var pickup = $("#pickup").val(); |
1119 |
var pickup = $("#pickup").val(); |
| 1123 |
var url = "?pickup=" + pickup; |
1120 |
var url = "?pickup=" + pickup; |
| 1124 |
url += "&borrowernumber=" + borrowernumber; |
1121 |
url += "&borrowernumber=" + borrowernumber; |
| 1125 |
url += "&biblionumber=" + biblionumber; |
1122 |
url += "&biblionumber=" + biblionumbers[0]; |
| 1126 |
window.location.replace(url); |
1123 |
window.location.replace(url); |
| 1127 |
}); |
1124 |
}); |
| 1128 |
[% END %] |
1125 |
[% END %] |
|
Lines 1152-1159
Link Here
|
| 1152 |
$("#club-request-form").on("submit", function() { |
1149 |
$("#club-request-form").on("submit", function() { |
| 1153 |
let $t = $(this); |
1150 |
let $t = $(this); |
| 1154 |
$('.clubalert, .holdalert').addClass('hide'); |
1151 |
$('.clubalert, .holdalert').addClass('hide'); |
| 1155 |
let biblionumbers = [biblionumber]; |
|
|
| 1156 |
let biblionumbers_text; |
| 1157 |
const data = { |
1152 |
const data = { |
| 1158 |
pickup_library_id: $('select[name="pickup"]').val() |
1153 |
pickup_library_id: $('select[name="pickup"]').val() |
| 1159 |
}; |
1154 |
}; |
|
Lines 1173-1184
Link Here
|
| 1173 |
if($('input[name="default_patron_home"]:checked').length) { |
1168 |
if($('input[name="default_patron_home"]:checked').length) { |
| 1174 |
data.default_patron_home = 1; |
1169 |
data.default_patron_home = 1; |
| 1175 |
} |
1170 |
} |
| 1176 |
if($('input[name="biblionumbers"]').length) { |
|
|
| 1177 |
biblionumbers_text = $('input[name="biblionumbers"]').val(); |
| 1178 |
biblionumbers = biblionumbers_text.replace(/\/$/, '').split('/') |
| 1179 |
} |
| 1180 |
|
1171 |
|
| 1181 |
const count = $('input[name="holds_to_place_count"]').length?$('input[name="holds_to_place_count"]').val():1; |
1172 |
const count = $('input[name="holds_to_place_count"]').length?$('input[name="holds_to_place_count"]').val():1; |
|
|
1173 |
var newloc = 'request.pl?'; |
| 1174 |
biblionumbers.forEach(function (biblionumber) { |
| 1175 |
newloc += '&biblionumber=' + biblionumber; |
| 1176 |
}); |
| 1177 |
|
| 1182 |
biblionumbers.forEach(function(biblionumber) { |
1178 |
biblionumbers.forEach(function(biblionumber) { |
| 1183 |
data.biblio_id = biblionumber; |
1179 |
data.biblio_id = biblionumber; |
| 1184 |
let options = { |
1180 |
let options = { |
|
Lines 1190-1200
Link Here
|
| 1190 |
for(let i = 0; i < count; i++) { |
1186 |
for(let i = 0; i < count; i++) { |
| 1191 |
$.ajax(options) |
1187 |
$.ajax(options) |
| 1192 |
.then(function(result) { |
1188 |
.then(function(result) { |
| 1193 |
let url = 'request.pl?biblionumber='+biblionumber; |
1189 |
document.location = newloc; |
| 1194 |
if(biblionumbers_text) { |
|
|
| 1195 |
url = 'request.pl?biblionumbers='+biblionumbers_text; |
| 1196 |
} |
| 1197 |
document.location = url; |
| 1198 |
}) |
1190 |
}) |
| 1199 |
.fail(function(err) { |
1191 |
.fail(function(err) { |
| 1200 |
var message = err.responseJSON.error; |
1192 |
var message = err.responseJSON.error; |
|
Lines 1405-1411
Link Here
|
| 1405 |
|
1397 |
|
| 1406 |
function checkMultiHold() { |
1398 |
function checkMultiHold() { |
| 1407 |
|
1399 |
|
| 1408 |
var biblionumbers = ""; |
|
|
| 1409 |
var selected_bibs = $(".multi_hold_item_checkbox:checked"); |
1400 |
var selected_bibs = $(".multi_hold_item_checkbox:checked"); |
| 1410 |
if ( selected_bibs.length > 0 ) { |
1401 |
if ( selected_bibs.length > 0 ) { |
| 1411 |
// there are biblios selected in the form! |
1402 |
// there are biblios selected in the form! |
|
Lines 1418-1424
Link Here
|
| 1418 |
} |
1409 |
} |
| 1419 |
else { |
1410 |
else { |
| 1420 |
var bibnum = $(this).attr("title"); |
1411 |
var bibnum = $(this).attr("title"); |
| 1421 |
biblionumbers += bibnum + "/"; |
|
|
| 1422 |
} |
1412 |
} |
| 1423 |
}); |
1413 |
}); |
| 1424 |
if ( pickup_not_set > 0 ) { |
1414 |
if ( pickup_not_set > 0 ) { |
|
Lines 1438-1444
Link Here
|
| 1438 |
badBibs += bibnum + "/"; |
1428 |
badBibs += bibnum + "/"; |
| 1439 |
}); |
1429 |
}); |
| 1440 |
|
1430 |
|
| 1441 |
$("#multi_hold_bibs").val(biblionumbers); |
|
|
| 1442 |
$("#bad_bibs").val(badBibs); |
1431 |
$("#bad_bibs").val(badBibs); |
| 1443 |
|
1432 |
|
| 1444 |
$('#hold-request-form').preventDoubleFormSubmit(); |
1433 |
$('#hold-request-form').preventDoubleFormSubmit(); |