|
Lines 706-712
Link Here
|
| 706 |
<a href="#" title="Checkout settings"><i class="fa-solid fa-sliders"></i></a> |
706 |
<a href="#" title="Checkout settings"><i class="fa-solid fa-sliders"></i></a> |
| 707 |
</div> |
707 |
</div> |
| 708 |
|
708 |
|
| 709 |
<button type="submit" class="btn btn-primary">Check out</button> |
709 |
[% IF waiting_holds_barcodes %] |
|
|
710 |
<button type="button" class="btn btn-primary">Check out</button> |
| 711 |
[% ELSE %] |
| 712 |
<button type="submit" class="btn btn-primary">Check out</button> |
| 713 |
[% END %] |
| 710 |
|
714 |
|
| 711 |
<div class="circ-settings"> |
715 |
<div class="circ-settings"> |
| 712 |
|
716 |
|
|
Lines 905-910
Link Here
|
| 905 |
</div> <!-- /.modal-dialog --> |
909 |
</div> <!-- /.modal-dialog --> |
| 906 |
</div> <!-- /#barcodeSubmittedModal --> |
910 |
</div> <!-- /#barcodeSubmittedModal --> |
| 907 |
|
911 |
|
|
|
912 |
[% IF waiting_holds_barcodes %] |
| 913 |
<div id="circ-warnwaitingholds-modal" class="modal fade audio-alert-action block"> |
| 914 |
<div class="modal-dialog"> |
| 915 |
<div class="modal-content"> |
| 916 |
<div class="modal-header"> |
| 917 |
<h3>This patron has waiting holds</h3> |
| 918 |
</div> |
| 919 |
<div class="modal-body"> |
| 920 |
<ul> |
| 921 |
<li> |
| 922 |
This patron has waiting holds that are available for checkout |
| 923 |
</li> |
| 924 |
</ul> |
| 925 |
</div> |
| 926 |
<div class="modal-footer"> |
| 927 |
<button type="button" class="btn btn-primary" data-dismiss="modal">Ok</button> |
| 928 |
</div> |
| 929 |
</div> |
| 930 |
</div> |
| 931 |
</div> |
| 932 |
[% END %] |
| 933 |
|
| 908 |
[% MACRO jsinclude BLOCK %] |
934 |
[% MACRO jsinclude BLOCK %] |
| 909 |
[% INCLUDE 'datatables.inc' %] |
935 |
[% INCLUDE 'datatables.inc' %] |
| 910 |
[% INCLUDE 'columns_settings.inc' %] |
936 |
[% INCLUDE 'columns_settings.inc' %] |
|
Lines 972-977
Link Here
|
| 972 |
var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top'); |
998 |
var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top'); |
| 973 |
} |
999 |
} |
| 974 |
$(document).ready(function() { |
1000 |
$(document).ready(function() { |
|
|
1001 |
[% IF waiting_holds_barcodes %] |
| 1002 |
$('#circ-warnwaitingholds-modal .btn-primary').on('click',function() { |
| 1003 |
$('#mainform').submit(); |
| 1004 |
}); |
| 1005 |
|
| 1006 |
var waiting_holds_barcodes = new Array(); |
| 1007 |
[% FOREACH b IN waiting_holds_barcodes %] |
| 1008 |
waiting_holds_barcodes.push("[% b | html %]"); |
| 1009 |
[% END %] |
| 1010 |
$('#barcode').on('keyup', function() { |
| 1011 |
$('#mainform .btn-primary').off('click'); |
| 1012 |
$('#barcode').off('keypress'); |
| 1013 |
if ( waiting_holds_barcodes.includes($('#barcode').val().trim()) ) { |
| 1014 |
$('#mainform .btn-primary').on('click',function() { |
| 1015 |
$('#mainform').submit(); |
| 1016 |
}); |
| 1017 |
|
| 1018 |
$('#barcode').on('keypress', function(e) { |
| 1019 |
if (e.which == 13) { |
| 1020 |
$('#mainform').submit(); |
| 1021 |
} |
| 1022 |
}); |
| 1023 |
} else { |
| 1024 |
$('#mainform .btn-primary').on('click',function() { |
| 1025 |
$('#circ-warnwaitingholds-modal').modal(); |
| 1026 |
}); |
| 1027 |
|
| 1028 |
$('#barcode').on('keypress', function(e) { |
| 1029 |
if (e.which == 13) { |
| 1030 |
$('#circ-warnwaitingholds-modal').modal(); |
| 1031 |
} |
| 1032 |
}); |
| 1033 |
} |
| 1034 |
}); |
| 1035 |
[% END %] |
| 1036 |
|
| 975 |
$('#mainform').on('submit',function() { |
1037 |
$('#mainform').on('submit',function() { |
| 976 |
if ($("#barcode") && $("#barcode").val()) { |
1038 |
if ($("#barcode") && $("#barcode").val()) { |
| 977 |
$('#barcode').on('keypress',function(event) { |
1039 |
$('#barcode').on('keypress',function(event) { |
| 978 |
- |
|
|