Lines 437-445
Link Here
|
437 |
</div> |
437 |
</div> |
438 |
|
438 |
|
439 |
[% UNLESS ( multi_hold ) %] |
439 |
[% UNLESS ( multi_hold ) %] |
440 |
<fieldset class="rows"> |
440 |
<form action="placerequest.pl" method="post" name="form" id="hold-request-form"> |
441 |
<legend>Hold details</legend> |
441 |
<fieldset class="rows"> |
442 |
<form action="placerequest.pl" method="post" name="form" id="hold-request-form"> |
442 |
<legend>Hold details</legend> |
443 |
|
443 |
|
444 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> |
444 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> |
445 |
<input type="hidden" name="type" value="str8" /> |
445 |
<input type="hidden" name="type" value="str8" /> |
Lines 463-472
Link Here
|
463 |
<span class="label">Estimated priority:</span> |
463 |
<span class="label">Estimated priority:</span> |
464 |
<strong>[% fixedRank | html %]</strong> |
464 |
<strong>[% fixedRank | html %]</strong> |
465 |
</li> |
465 |
</li> |
466 |
<li> |
|
|
467 |
<label for="holdnotes">Notes:</label> |
468 |
<textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea> |
469 |
</li> |
470 |
[% IF ( reserve_in_future ) %] |
466 |
[% IF ( reserve_in_future ) %] |
471 |
<li> |
467 |
<li> |
472 |
<label for="from">Hold starts on date:</label> |
468 |
<label for="from">Hold starts on date:</label> |
Lines 484-535
Link Here
|
484 |
<input name="non_priority" id="non_priority" type="checkbox" /> |
480 |
<input name="non_priority" id="non_priority" type="checkbox" /> |
485 |
<span class="hint">A non priority hold doesn't prevent a current checkout from renewing</span> |
481 |
<span class="hint">A non priority hold doesn't prevent a current checkout from renewing</span> |
486 |
</li> |
482 |
</li> |
487 |
<fieldset> |
483 |
<li> |
488 |
<legend> |
484 |
<label for="holdnotes">Notes:</label> |
489 |
<label for="requestany"> |
485 |
<textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea> |
490 |
Hold next available item |
486 |
</li> |
491 |
[% IF force_hold_level == 'item' %] |
487 |
</ol> |
492 |
<input type="checkbox" id="requestany" name="request" disabled="true" /> |
488 |
</fieldset> |
493 |
[% ELSIF force_hold_level == 'record' %] |
489 |
|
494 |
<input type="checkbox" id="requestany" checked="checked" value="Any" disabled="true"/> |
490 |
<fieldset class="rows"> |
495 |
<input type="hidden" name="request" value="Any"/> |
491 |
<legend> |
496 |
[% ELSE %] |
492 |
<label for="requestany"> |
497 |
<input type="checkbox" id="requestany" name="request" checked="checked" value="Any" /> |
493 |
Hold next available item |
498 |
[% END %] |
494 |
[% IF force_hold_level == 'item' %] |
499 |
<input type="hidden" name="alreadyreserved" value="[% alreadyreserved | html %]" /> |
495 |
<input type="radio" class="requestany" id="requestany" name="request" disabled="true" /> |
500 |
</label> |
496 |
[% ELSIF force_hold_level == 'record' %] |
501 |
</legend> |
497 |
<input type="radio" class="requestany" id="requestany" checked="checked" value="Any" disabled="true"/> |
502 |
<ol> |
498 |
<input type="hidden" name="request" value="Any"/> |
503 |
<li> |
499 |
[% ELSE %] |
504 |
<label for="pickup">Pickup at:</label> |
500 |
<input type="radio" class="requestany" id="requestany" name="request" checked="checked" value="Any" /> |
505 |
<select name="pickup" id="pickup" |
501 |
[% END %] |
506 |
data-biblio-id="[% biblio.biblionumber | html %]" |
502 |
<input type="hidden" name="alreadyreserved" value="[% alreadyreserved | html %]" /> |
507 |
data-patron-id="[% patron.borrowernumber | html %]" |
503 |
</label> |
508 |
data-pickup-location-source="biblio"> |
504 |
</legend> |
509 |
[% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %] |
505 |
<ol> |
510 |
</select> |
506 |
<li> |
511 |
</li> |
507 |
<label for="pickup">Pickup at:</label> |
512 |
[% IF Koha.Preference('AllowHoldItemTypeSelection') %] |
508 |
<select name="pickup" id="pickup" |
513 |
<li> |
509 |
data-biblio-id="[% biblio.biblionumber | html %]" |
514 |
<label for="itemtype">Request specific item type:</label> |
510 |
data-patron-id="[% patron.borrowernumber | html %]" |
515 |
<select name="itemtype" id="itemtype"> |
511 |
data-pickup-location-source="biblio"> |
516 |
<option value="">Any item type</option> |
512 |
[% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %] |
517 |
[%- FOREACH itemtype IN available_itemtypes %] |
513 |
</select> |
518 |
<option value="[% itemtype | html %]">[% ItemTypes.GetDescription( itemtype ) | html %]</option> |
514 |
</li> |
519 |
[%- END %] |
515 |
[% IF Koha.Preference('AllowHoldItemTypeSelection') %] |
520 |
</select> |
516 |
<li> |
521 |
</li> |
517 |
<label for="itemtype">Request specific item type:</label> |
522 |
[% END %] |
518 |
<select name="itemtype" id="itemtype"> |
523 |
[% IF remaining_holds_for_record > 1 %] |
519 |
<option value="">Any item type</option> |
524 |
<li> |
520 |
[%- FOREACH itemtype IN available_itemtypes %] |
525 |
<label for="holds_to_place_count">Holds to place (count)</label> |
521 |
<option value="[% itemtype | html %]">[% ItemTypes.GetDescription( itemtype ) | html %]</option> |
526 |
<input type="text" inputmode="numeric" pattern="[0-9]*" id="holds_to_place_count" name="holds_to_place_count" maxlength="[% remaining_holds_for_record | html %]" value="1" /> |
522 |
[%- END %] |
527 |
</li> |
523 |
</select> |
528 |
[% ELSE %] |
524 |
</li> |
529 |
<input type="hidden" name="holds_to_place_count" value="1" /> |
525 |
[% END %] |
530 |
[% END %] |
526 |
[% IF remaining_holds_for_record > 1 %] |
531 |
</ol> |
527 |
<li> |
532 |
</fieldset> |
528 |
<label for="holds_to_place_count">Holds to place (count)</label> |
|
|
529 |
<input type="text" inputmode="numeric" pattern="[0-9]*" id="holds_to_place_count" name="holds_to_place_count" maxlength="[% remaining_holds_for_record | html %]" value="1" /> |
530 |
</li> |
531 |
[% ELSE %] |
532 |
<input type="hidden" name="holds_to_place_count" value="1" /> |
533 |
[% END %] |
533 |
</ol> |
534 |
</ol> |
534 |
<fieldset class="action"> |
535 |
<fieldset class="action"> |
535 |
[% IF ( patron.borrowernumber ) %] |
536 |
[% IF ( patron.borrowernumber ) %] |
Lines 542-547
Link Here
|
542 |
[% END %] |
543 |
[% END %] |
543 |
[% END %] |
544 |
[% END %] |
544 |
</fieldset> |
545 |
</fieldset> |
|
|
546 |
</fieldset> |
547 |
|
548 |
<hr /> |
549 |
|
550 |
<fieldset class="rows"> |
551 |
<legend> |
552 |
<label> |
553 |
Place a hold on a specific item |
554 |
<input type="radio" name="request" class="requestany" /> |
555 |
</label> |
556 |
[% IF force_hold_level == 'item' %] |
557 |
<span class="error"><em>Required</em></span> |
558 |
[% END %] |
559 |
</legend> |
545 |
|
560 |
|
546 |
[% biblio = biblioloop.0 %] |
561 |
[% biblio = biblioloop.0 %] |
547 |
|
562 |
|
Lines 561-573
Link Here
|
561 |
[% END %] |
576 |
[% END %] |
562 |
</ol> |
577 |
</ol> |
563 |
|
578 |
|
564 |
<h2 style="padding: 0 1em;"> |
|
|
565 |
Place a hold on a specific item |
566 |
[% IF force_hold_level == 'item' %] |
567 |
<span class="error"><em>(Required)</em></span> |
568 |
[% END %] |
569 |
</h2> |
570 |
|
571 |
<table id="requestspecific"> |
579 |
<table id="requestspecific"> |
572 |
<thead> |
580 |
<thead> |
573 |
<tr> |
581 |
<tr> |
Lines 602-610
Link Here
|
602 |
Hold must be record level |
610 |
Hold must be record level |
603 |
</span> |
611 |
</span> |
604 |
[% ELSIF ( itemloo.available ) %] |
612 |
[% ELSIF ( itemloo.available ) %] |
605 |
<input type="radio" name="checkitem" value="[% itemloo.itemnumber | html %]" /> |
613 |
<input type="radio" name="checkitem" class="requestspecific" value="[% itemloo.itemnumber | html %]" /> |
606 |
[% ELSIF ( itemloo.override ) %] |
614 |
[% ELSIF ( itemloo.override ) %] |
607 |
<input type="radio" name="checkitem" class="needsoverride" value="[% itemloo.itemnumber | html %]" /> |
615 |
<input type="radio" name="checkitem" class="needsoverride requestspecific" value="[% itemloo.itemnumber | html %]" /> |
608 |
<i class="fa fa-exclamation-triangle fa-lg" style="color:gold" title="Requires override of hold policy"/></i> |
616 |
<i class="fa fa-exclamation-triangle fa-lg" style="color:gold" title="Requires override of hold policy"/></i> |
609 |
[% ELSE %] |
617 |
[% ELSE %] |
610 |
<span class="error"> |
618 |
<span class="error"> |
Lines 647-653
Link Here
|
647 |
</td> |
655 |
</td> |
648 |
<td> |
656 |
<td> |
649 |
[% IF (itemloo.pickup_locations_count > 0) %] |
657 |
[% IF (itemloo.pickup_locations_count > 0) %] |
650 |
<select name="item_pickup_[% itemloo.itemnumber | html %]" class="pickup_locations" style="width:100%;" |
658 |
<select name="item_pickup_[% itemloo.itemnumber | html %]" class="pickup_locations requestspecific" style="width:100%;" |
651 |
data-item-id="[% itemloo.itemnumber | html %]" |
659 |
data-item-id="[% itemloo.itemnumber | html %]" |
652 |
data-patron-id="[% patron.borrowernumber | html %]" |
660 |
data-patron-id="[% patron.borrowernumber | html %]" |
653 |
data-pickup-location-source="item"> |
661 |
data-pickup-location-source="item"> |
Lines 753-763
Link Here
|
753 |
</table> <!-- /#requestspecific --> |
761 |
</table> <!-- /#requestspecific --> |
754 |
|
762 |
|
755 |
[% IF hiddencount %] |
763 |
[% IF hiddencount %] |
756 |
<form> |
764 |
<p class="hiddencount"> |
757 |
<p class="hiddencount"> |
765 |
<a href="request.pl?biblionumber=[% biblio.biblionumber | uri %]&borrowernumber=[% borrowernumber | uri %]&showallitems=1">Show all items ([% biblio.hiddencount | html %] hidden)</a> |
758 |
<a href="request.pl?biblionumber=[% biblio.biblionumber | uri %]&borrowernumber=[% borrowernumber | uri %]&showallitems=1">Show all items ([% biblio.hiddencount | html %] hidden)</a> |
766 |
</p> |
759 |
</p> |
|
|
760 |
</form> |
761 |
[% END # /IF hiddencount %] |
767 |
[% END # /IF hiddencount %] |
762 |
|
768 |
|
763 |
<fieldset class="action"> |
769 |
<fieldset class="action"> |
Lines 771-778
Link Here
|
771 |
[% END %] |
777 |
[% END %] |
772 |
[% END # /IF patron %] |
778 |
[% END # /IF patron %] |
773 |
</fieldset> <!-- /.action --> |
779 |
</fieldset> <!-- /.action --> |
774 |
</form> <!-- /#hold-request-form --> |
780 |
</fieldset> <!-- /.rows --> |
775 |
</fieldset> <!-- /.rows --> |
781 |
</form> <!-- /#hold-request-form --> |
776 |
[% ELSE # Multi-hold %] |
782 |
[% ELSE # Multi-hold %] |
777 |
<fieldset class="rows"> |
783 |
<fieldset class="rows"> |
778 |
<legend>Hold details</legend> |
784 |
<legend>Hold details</legend> |
Lines 803-812
Link Here
|
803 |
[% END %] |
809 |
[% END %] |
804 |
</li> |
810 |
</li> |
805 |
|
811 |
|
806 |
<li> |
|
|
807 |
<label for="holdnotes">Notes:</label> |
808 |
<textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea> |
809 |
</li> |
810 |
<li> |
812 |
<li> |
811 |
<label for="pickup">Pickup at:</label> |
813 |
<label for="pickup">Pickup at:</label> |
812 |
<select name="pickup" id="pickup_multi" data-patron-id="[% patron.borrowernumber | html %]"> |
814 |
<select name="pickup" id="pickup_multi" data-patron-id="[% patron.borrowernumber | html %]"> |
Lines 817-823
Link Here
|
817 |
</select> |
819 |
</select> |
818 |
</li> |
820 |
</li> |
819 |
|
821 |
|
820 |
|
|
|
821 |
[% IF ( reserve_in_future ) %] |
822 |
[% IF ( reserve_in_future ) %] |
822 |
<li> |
823 |
<li> |
823 |
<label for="from">Hold starts on date:</label> |
824 |
<label for="from">Hold starts on date:</label> |
Lines 836-841
Link Here
|
836 |
<input name="non_priority" id="non_priority" type="checkbox" /> |
837 |
<input name="non_priority" id="non_priority" type="checkbox" /> |
837 |
<span class="hint">A non priority hold doesn't prevent a current checkout from renewing</span> |
838 |
<span class="hint">A non priority hold doesn't prevent a current checkout from renewing</span> |
838 |
</li> |
839 |
</li> |
|
|
840 |
|
841 |
<li> |
842 |
<label for="holdnotes">Notes:</label> |
843 |
<textarea id="holdnotes" name="notes" cols="30" rows="1"></textarea> |
844 |
</li> |
839 |
</ol> |
845 |
</ol> |
840 |
|
846 |
|
841 |
|
847 |
|
Lines 943-952
Link Here
|
943 |
[% END %] |
949 |
[% END %] |
944 |
[% END # /IF patron %] |
950 |
[% END # /IF patron %] |
945 |
</fieldset> <!-- /.action --> |
951 |
</fieldset> <!-- /.action --> |
946 |
</form> <!-- /#hold-request-form --> |
952 |
</fieldset> <!-- /.rows --> |
947 |
</fieldset> <!-- /.rows --> |
953 |
</form> <!-- /#hold-request-form --> |
948 |
[% END %] |
954 |
[% END # /UNLESS ( multi_hold ) %] |
949 |
[% END %] |
955 |
[% END # /UNLESS club OR patron... %] |
950 |
|
956 |
|
951 |
[% UNLESS ( patron ) %] |
957 |
[% UNLESS ( patron ) %] |
952 |
[% UNLESS borrowers %] |
958 |
[% UNLESS borrowers %] |
Lines 1253-1267
Link Here
|
1253 |
$( active_tab ).find("input.focus").focus(); |
1259 |
$( active_tab ).find("input.focus").focus(); |
1254 |
}); |
1260 |
}); |
1255 |
|
1261 |
|
1256 |
function ToggleHoldsToPlace() { |
|
|
1257 |
if ( $("#requestany").prop('checked') ) { |
1258 |
$("#holds_to_place_count,#pickup,#itemtype").prop('disabled', false); |
1259 |
} else { |
1260 |
$("#holds_to_place_count,#pickup,#itemtype").prop('disabled', true); |
1261 |
} |
1262 |
} |
1263 |
ToggleHoldsToPlace(); |
1262 |
ToggleHoldsToPlace(); |
1264 |
$("#requestany").on('change', function(){ |
1263 |
$(".requestany").on('change', function(){ |
1265 |
ToggleHoldsToPlace(); |
1264 |
ToggleHoldsToPlace(); |
1266 |
}); |
1265 |
}); |
1267 |
|
1266 |
|
Lines 1280-1292
Link Here
|
1280 |
"sDom": '<"top pager"ilf>t', |
1279 |
"sDom": '<"top pager"ilf>t', |
1281 |
})); |
1280 |
})); |
1282 |
|
1281 |
|
1283 |
//Override fieldset styling for dataTables search box |
|
|
1284 |
$("div.top.pager").css("margin-left","1em"); |
1285 |
$(".dataTables_filter label").css({ |
1286 |
"width":"auto", |
1287 |
"margin-right":"0em" |
1288 |
}); |
1289 |
|
1290 |
$("#club-request-form").on("submit", function() { |
1282 |
$("#club-request-form").on("submit", function() { |
1291 |
let $t = $(this); |
1283 |
let $t = $(this); |
1292 |
$('.clubalert, .holdalert').addClass('hide'); |
1284 |
$('.clubalert, .holdalert').addClass('hide'); |
Lines 1385-1390
Link Here
|
1385 |
}); |
1377 |
}); |
1386 |
}); |
1378 |
}); |
1387 |
|
1379 |
|
|
|
1380 |
function ToggleHoldsToPlace() { |
1381 |
if ( $("#requestany").prop('checked') ) { |
1382 |
$("#holds_to_place_count, #pickup, #itemtype").prop('disabled', false); |
1383 |
$(".requestspecific").prop("disabled", true ); |
1384 |
} else { |
1385 |
$("#holds_to_place_count, #pickup, #itemtype").prop('disabled', true); |
1386 |
$(".requestspecific").prop("disabled", false ); |
1387 |
} |
1388 |
} |
1389 |
|
1388 |
function check( table ) { |
1390 |
function check( table ) { |
1389 |
|
1391 |
|
1390 |
var msg = ""; |
1392 |
var msg = ""; |
1391 |
- |
|
|