|
Lines 666-672
Link Here
|
| 666 |
<a href="#" title="Checkout settings"><i class="fa-solid fa-sliders"></i></a> |
666 |
<a href="#" title="Checkout settings"><i class="fa-solid fa-sliders"></i></a> |
| 667 |
</div> |
667 |
</div> |
| 668 |
|
668 |
|
| 669 |
<button type="submit" class="btn btn-primary">Check out</button> |
669 |
[% IF waiting_holds_barcodes %] |
|
|
670 |
<button type="button" class="btn btn-primary">Check out</button> |
| 671 |
[% ELSE %] |
| 672 |
<button type="submit" class="btn btn-primary">Check out</button> |
| 673 |
[% END %] |
| 670 |
|
674 |
|
| 671 |
<div class="circ-settings"> |
675 |
<div class="circ-settings"> |
| 672 |
|
676 |
|
|
Lines 865-870
Link Here
|
| 865 |
</div> <!-- /.modal-dialog --> |
869 |
</div> <!-- /.modal-dialog --> |
| 866 |
</div> <!-- /#barcodeSubmittedModal --> |
870 |
</div> <!-- /#barcodeSubmittedModal --> |
| 867 |
|
871 |
|
|
|
872 |
[% IF waiting_holds_barcodes %] |
| 873 |
<div id="circ-warnwaitingholds-modal" class="modal fade audio-alert-action block"> |
| 874 |
<div class="modal-dialog"> |
| 875 |
<div class="modal-content"> |
| 876 |
<div class="modal-header"> |
| 877 |
<h3>This patron has waiting holds</h3> |
| 878 |
</div> |
| 879 |
<div class="modal-body"> |
| 880 |
<ul> |
| 881 |
<li> |
| 882 |
This patron has waiting holds that are available for checkout |
| 883 |
</li> |
| 884 |
</ul> |
| 885 |
</div> |
| 886 |
<div class="modal-footer"> |
| 887 |
<button type="button" class="btn btn-primary" data-dismiss="modal">Ok</button> |
| 888 |
</div> |
| 889 |
</div> |
| 890 |
</div> |
| 891 |
</div> |
| 892 |
[% END %] |
| 893 |
|
| 868 |
[% MACRO jsinclude BLOCK %] |
894 |
[% MACRO jsinclude BLOCK %] |
| 869 |
[% INCLUDE 'datatables.inc' %] |
895 |
[% INCLUDE 'datatables.inc' %] |
| 870 |
[% INCLUDE 'columns_settings.inc' %] |
896 |
[% INCLUDE 'columns_settings.inc' %] |
|
Lines 931-936
Link Here
|
| 931 |
var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top'); |
957 |
var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top'); |
| 932 |
} |
958 |
} |
| 933 |
$(document).ready(function() { |
959 |
$(document).ready(function() { |
|
|
960 |
[% IF waiting_holds_barcodes %] |
| 961 |
$('#circ-warnwaitingholds-modal .btn-primary').on('click',function() { |
| 962 |
$('#mainform').submit(); |
| 963 |
}); |
| 964 |
|
| 965 |
var waiting_holds_barcodes = new Array(); |
| 966 |
[% FOREACH b IN waiting_holds_barcodes %] |
| 967 |
waiting_holds_barcodes.push("[% b | html %]"); |
| 968 |
[% END %] |
| 969 |
$('#barcode').on('keyup', function() { |
| 970 |
$('#mainform .btn-primary').off('click'); |
| 971 |
$('#barcode').off('keypress'); |
| 972 |
if ( waiting_holds_barcodes.includes($('#barcode').val().trim()) ) { |
| 973 |
$('#mainform .btn-primary').on('click',function() { |
| 974 |
$('#mainform').submit(); |
| 975 |
}); |
| 976 |
|
| 977 |
$('#barcode').on('keypress', function(e) { |
| 978 |
if (e.which == 13) { |
| 979 |
$('#mainform').submit(); |
| 980 |
} |
| 981 |
}); |
| 982 |
} else { |
| 983 |
$('#mainform .btn-primary').on('click',function() { |
| 984 |
$('#circ-warnwaitingholds-modal').modal(); |
| 985 |
}); |
| 986 |
|
| 987 |
$('#barcode').on('keypress', function(e) { |
| 988 |
if (e.which == 13) { |
| 989 |
$('#circ-warnwaitingholds-modal').modal(); |
| 990 |
} |
| 991 |
}); |
| 992 |
} |
| 993 |
}); |
| 994 |
[% END %] |
| 995 |
|
| 934 |
$('#mainform').on('submit',function() { |
996 |
$('#mainform').on('submit',function() { |
| 935 |
if ($("#barcode") && $("#barcode").val()) { |
997 |
if ($("#barcode") && $("#barcode").val()) { |
| 936 |
$('#barcode').on('keypress',function(event) { |
998 |
$('#barcode').on('keypress',function(event) { |
| 937 |
- |
|
|