|
Lines 604-623
Link Here
|
| 604 |
<p>Book drop mode. (Effective checkin date is [% dropboxdate | html %] ).</p> |
604 |
<p>Book drop mode. (Effective checkin date is [% dropboxdate | html %] ).</p> |
| 605 |
</div> |
605 |
</div> |
| 606 |
</div> |
606 |
</div> |
| 607 |
<div class="yui-g"> |
607 |
|
| 608 |
<form id="checkin-form" method="post" action="/cgi-bin/koha/circ/returns.pl" autocomplete="off" > |
608 |
<form id="checkin-form" method="post" action="/cgi-bin/koha/circ/returns.pl" autocomplete="off"> |
| 609 |
<div class="yui-u first"> |
609 |
<fieldset id="circ_returns_checkin"> |
| 610 |
<fieldset> |
610 |
<h3>Check in</h3> |
| 611 |
<legend>Check in</legend> |
611 |
<div class="row"> |
| 612 |
<label for="barcode">Enter item barcode: </label> |
612 |
<div class="col-sm-6"> |
| 613 |
[% IF ( exemptfine ) %] |
613 |
<div class="hint">Enter item barcode:</div> |
| 614 |
<input name="barcode" id="barcode" size="14" class="focus alert"/> |
614 |
[% IF ( exemptfine ) %] |
| 615 |
[% ELSIF ( dropboxmode ) %] |
615 |
<input name="barcode" id="barcode" size="14" class="barcode focus input-warning" /> |
| 616 |
<input name="barcode" id="barcode" size="14" class="focus alert"/> |
616 |
[% ELSIF ( dropboxmode ) %] |
| 617 |
[% ELSE %] |
617 |
<input name="barcode" id="barcode" size="14" class="barcode focus input-warning" /> |
| 618 |
<input name="barcode" id="barcode" size="14" class="focus"/> |
618 |
[% ELSE %] |
| 619 |
[% END %] |
619 |
<input name="barcode" id="barcode" size="14" class="barcode focus" /> |
| 620 |
<input type="submit" class="submit" value="Submit" /> |
620 |
[% END %] |
|
|
621 |
<button type="submit" class="btn btn-default">Check in</button> |
| 622 |
[% FOREACH inputloo IN inputloop %] |
| 623 |
<input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" /> |
| 624 |
<input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" /> |
| 625 |
<input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" /> |
| 626 |
[% END %] |
| 627 |
<div id="show-circ-settings"> |
| 628 |
<a href="#"><i class="fa circ-settings-icon fa-caret-down"></i> Checkin settings</a> |
| 629 |
</div> |
| 630 |
</div> |
| 631 |
<div class="col-sm-6"> |
| 632 |
<div id="exemptfines" class="checkin-active-setting" style="display:none;"> |
| 633 |
<p><i class="fa fa-check"></i> Fines for returned items are forgiven.</p> |
| 634 |
</div> |
| 635 |
<div id="forgivemanualholdsexpire-alert" class="checkin-active-setting" style="display:none;"> |
| 636 |
<p><i class="fa fa-check"></i> Fines are not charged for manually cancelled holds.</p> |
| 637 |
</div> |
| 638 |
<div id="dropboxmode" class="checkin-active-setting" style="display:none;"> |
| 639 |
<p><i class="fa fa-check"></i> Book drop mode. (Effective checkin date is [% dropboxdate %] ).</p> |
| 640 |
</div> |
| 641 |
</div> |
| 642 |
</div> |
| 643 |
|
| 644 |
<div class="circ-settings"> |
| 621 |
|
645 |
|
| 622 |
[% IF Koha.Preference('SpecifyReturnDate') %] |
646 |
[% IF Koha.Preference('SpecifyReturnDate') %] |
| 623 |
<div class="date-select" id="return_date_override_fields"> |
647 |
<div class="date-select" id="return_date_override_fields"> |
|
Lines 639-684
Link Here
|
| 639 |
<input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" /> |
663 |
<input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" /> |
| 640 |
<input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" /> |
664 |
<input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" /> |
| 641 |
<input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" /> |
665 |
<input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" /> |
|
|
666 |
======= |
| 667 |
<button type="button" class="action btn btn-default btn-xs" id="cleardate" name="cleardate" onclick="this.checked = false; this.form.return_date_override.value = ''; this.form.return_date_override_remember.checked = false; this.form.barcode.focus(); return false;">Clear</button> |
| 668 |
</div> |
| 669 |
>>>>>>> Bug 20959: Style checkin form more like the checkout form, with collapsed settings panel |
| 642 |
[% END %] |
670 |
[% END %] |
| 643 |
|
671 |
|
| 644 |
|
672 |
[% IF ( CAN_user_updatecharges_writeoff && overduecharges ) %] |
| 645 |
</fieldset> |
673 |
<div id="forgive-overdue-fines" class="circ-setting"> |
| 646 |
</div> |
674 |
[% IF ( exemptfine ) %] |
| 647 |
<div class="yui-u"> |
|
|
| 648 |
<fieldset id="checkin_options"> |
| 649 |
<legend>Options</legend> |
| 650 |
[% IF ( CAN_user_updatecharges_writeoff && overduecharges ) %] |
| 651 |
<p> |
| 652 |
[% IF ( exemptfine ) %] |
| 653 |
<input type="checkbox" id="exemptcheck" name="exemptfine" value="exemptfine" checked="checked" /> |
675 |
<input type="checkbox" id="exemptcheck" name="exemptfine" value="exemptfine" checked="checked" /> |
| 654 |
[% ELSE %] |
676 |
[% ELSE %] |
| 655 |
<input type="checkbox" id="exemptcheck" name="exemptfine" value="exemptfine" /> |
677 |
<input type="checkbox" id="exemptcheck" name="exemptfine" value="exemptfine" /> |
| 656 |
[% END %] |
678 |
[% END %] |
| 657 |
<label for="exemptcheck">Forgive overdue charges</label> |
679 |
<label for="exemptcheck">Forgive overdue charges</label> |
| 658 |
</p> |
680 |
</div> |
| 659 |
[% END %] <!-- overduecharges --> |
681 |
[% END %] |
| 660 |
<p> |
682 |
<!-- overduecharges --> |
| 661 |
[% IF ( dropboxmode ) %] |
683 |
<div id="book-drop-mode" class="circ-setting"> |
| 662 |
<input type="checkbox" id="dropboxcheck" name="dropboxmode" value="dropboxmode" checked="checked" /> |
684 |
[% IF ( dropboxmode ) %] |
| 663 |
[% ELSE %] |
685 |
<input type="checkbox" id="dropboxcheck" name="dropboxmode" value="dropboxmode" checked="checked" /> |
| 664 |
<input type="checkbox" id="dropboxcheck" name="dropboxmode" value="dropboxmode" /> |
686 |
[% ELSE %] |
| 665 |
[% END %] |
687 |
<input type="checkbox" id="dropboxcheck" name="dropboxmode" value="dropboxmode" /> |
| 666 |
<label for="dropboxcheck">Book drop mode</label> |
688 |
[% END %] |
| 667 |
</p> |
689 |
<label for="dropboxcheck">Book drop mode</label> |
| 668 |
[% IF Koha.Preference('ExpireReservesMaxPickUpDelayCharge') %] |
690 |
</div> |
| 669 |
<p> |
691 |
[% IF Koha.Preference('ExpireReservesMaxPickUpDelayCharge') %] |
| 670 |
[% IF ( forgivemanualholdsexpire ) %] |
692 |
<div id="forgive-manual-hold-fees" class="circ-setting"> |
|
|
693 |
[% IF ( forgivemanualholdsexpire ) %] |
| 671 |
<input type="checkbox" id="forgivemanualholdsexpire" name="forgivemanualholdsexpire" value="forgivemanualholdsexpire" checked="checked" /> |
694 |
<input type="checkbox" id="forgivemanualholdsexpire" name="forgivemanualholdsexpire" value="forgivemanualholdsexpire" checked="checked" /> |
| 672 |
[% ELSE %] |
695 |
[% ELSE %] |
| 673 |
<input type="checkbox" id="forgivemanualholdsexpire" name="forgivemanualholdsexpire" value="forgivemanualholdsexpire" /> |
696 |
<input type="checkbox" id="forgivemanualholdsexpire" name="forgivemanualholdsexpire" value="forgivemanualholdsexpire" /> |
| 674 |
[% END %] |
697 |
[% END %] |
| 675 |
<label for="forgivemanualholdsexpire">Forgive fees for manually expired holds</label> |
698 |
<label for="forgivemanualholdsexpire">Forgive fees for manually expired holds</label> |
| 676 |
</p> |
699 |
</div> |
| 677 |
[% END %] <!-- overduecharges --> |
700 |
[% END %] |
| 678 |
</fieldset> |
701 |
<!-- overduecharges --> |
| 679 |
</div> |
702 |
</div> [%# /.circ-settings %] |
| 680 |
</form> |
703 |
</fieldset> [%# /#circ_returns_checkin %] |
| 681 |
</div> |
704 |
</form> [%# /#checkin-form %] |
| 682 |
|
705 |
|
| 683 |
[% IF ( riloop ) %] |
706 |
[% IF ( riloop ) %] |
| 684 |
<h2>Checked-in items</h2> |
707 |
<h2>Checked-in items</h2> |
|
Lines 749-761
Link Here
|
| 749 |
[% INCLUDE 'columns_settings.inc' %] |
772 |
[% INCLUDE 'columns_settings.inc' %] |
| 750 |
[% INCLUDE 'calendar.inc' %] |
773 |
[% INCLUDE 'calendar.inc' %] |
| 751 |
[% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %] |
774 |
[% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %] |
|
|
775 |
[% Asset.js("js/pages/circulation.js") | $raw %] |
| 752 |
[% INCLUDE 'timepicker.inc' %] |
776 |
[% INCLUDE 'timepicker.inc' %] |
| 753 |
|
777 |
|
| 754 |
<script type="text/javascript"> |
778 |
<script> |
| 755 |
function Dopop(link) { |
779 |
function Dopop(link) { |
| 756 |
var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top'); |
780 |
var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top'); |
| 757 |
$("#barcode").focus(); |
781 |
$("#barcode").focus(); |
| 758 |
} |
782 |
} |
|
|
783 |
|
| 784 |
function check_valid_return_date() { |
| 785 |
if ( $("#return_date_override").val() ) { |
| 786 |
var datetime = DateTime_from_syspref( $("#return_date_override").val() ); |
| 787 |
var now = new Date(); |
| 788 |
if ( !datetime || datetime > now ) { |
| 789 |
alert("Invalid return date/time!"); |
| 790 |
$("#return_date_override").val("") |
| 791 |
return false; |
| 792 |
} |
| 793 |
} |
| 794 |
return true; |
| 795 |
} |
| 796 |
|
| 759 |
$(document).ready(function () { |
797 |
$(document).ready(function () { |
| 760 |
$(".modal").modal({ backdrop: 'static' }).on('shown', function() { |
798 |
$(".modal").modal({ backdrop: 'static' }).on('shown', function() { |
| 761 |
$("#barcode").prop("disabled", true); |
799 |
$("#barcode").prop("disabled", true); |
|
Lines 805-842
Link Here
|
| 805 |
} |
843 |
} |
| 806 |
}); |
844 |
}); |
| 807 |
|
845 |
|
| 808 |
function check_valid_return_date() { |
|
|
| 809 |
if ( $("#return_date_override").val() ) { |
| 810 |
var datetime = DateTime_from_syspref( $("#return_date_override").val() ); |
| 811 |
var now = new Date(); |
| 812 |
if ( !datetime || datetime > now ) { |
| 813 |
alert("Invalid return date/time!"); |
| 814 |
$("#return_date_override").val("") |
| 815 |
return false; |
| 816 |
} |
| 817 |
} |
| 818 |
return true; |
| 819 |
} |
| 820 |
|
| 821 |
$("#exemptcheck").change(function () { |
846 |
$("#exemptcheck").change(function () { |
| 822 |
if (this.checked == true) { |
847 |
if (this.checked == true) { |
| 823 |
$("#barcode").addClass("alert"); |
848 |
$("#barcode").addClass("input-warning"); |
| 824 |
$("#exemptfines").show(); |
849 |
$("#exemptfines").show(); |
| 825 |
} else { |
850 |
} else { |
| 826 |
$("#barcode").removeClass("alert"); |
851 |
$("#barcode").removeClass("input-warning"); |
| 827 |
$("#exemptfines").hide(); |
852 |
$("#exemptfines").hide(); |
| 828 |
} |
853 |
} |
| 829 |
$("#barcode").focus(); |
854 |
$("#barcode").focus(); |
| 830 |
}); |
855 |
}); |
| 831 |
$("#dropboxcheck").change(function () { |
856 |
$("#dropboxcheck").change(function () { |
| 832 |
if (this.checked == true) { |
857 |
if (this.checked == true) { |
| 833 |
$("#barcode").addClass("alert"); |
858 |
$("#barcode").addClass("input-warning"); |
| 834 |
$("#dropboxmode").show(); |
859 |
$("#dropboxmode").show(); |
| 835 |
|
860 |
|
| 836 |
$("#return_date_override_fields :input").prop('disabled', true); |
861 |
$("#return_date_override_fields :input").prop('disabled', true); |
| 837 |
$("#return_date_override").datetimepicker("disable"); |
862 |
$("#return_date_override").datetimepicker("disable"); |
| 838 |
} else { |
863 |
} else { |
| 839 |
$("#barcode").removeClass("alert"); |
864 |
$("#barcode").removeClass("input-warning"); |
| 840 |
$("#dropboxmode").hide(); |
865 |
$("#dropboxmode").hide(); |
| 841 |
|
866 |
|
| 842 |
$("#return_date_override_fields :input").prop('disabled', false); |
867 |
$("#return_date_override_fields :input").prop('disabled', false); |
|
Lines 846-855
Link Here
|
| 846 |
}); |
871 |
}); |
| 847 |
$("#forgivemanualholdsexpire").change(function () { |
872 |
$("#forgivemanualholdsexpire").change(function () { |
| 848 |
if (this.checked == true) { |
873 |
if (this.checked == true) { |
| 849 |
$("#barcode").addClass("alert"); |
874 |
$("#barcode").addClass("input-warning"); |
| 850 |
$("#forgivemanualholdsexpire-alert").show(); |
875 |
$("#forgivemanualholdsexpire-alert").show(); |
| 851 |
} else { |
876 |
} else { |
| 852 |
$("#barcode").removeClass("alert"); |
877 |
$("#barcode").removeClass("input-warning"); |
| 853 |
$("#forgivemanualholdsexpire-alert").hide(); |
878 |
$("#forgivemanualholdsexpire-alert").hide(); |
| 854 |
} |
879 |
} |
| 855 |
$("#barcode").focus(); |
880 |
$("#barcode").focus(); |
|
Lines 858-870
Link Here
|
| 858 |
[% IF(overduecharges) %] |
883 |
[% IF(overduecharges) %] |
| 859 |
$("#barcode").focus(function () { |
884 |
$("#barcode").focus(function () { |
| 860 |
if (($("#exemptcheck").prop("checked") == true) || ($("#dropboxcheck").prop("checked") == true)) { |
885 |
if (($("#exemptcheck").prop("checked") == true) || ($("#dropboxcheck").prop("checked") == true)) { |
| 861 |
$("#barcode").addClass("alert"); |
886 |
$("#barcode").addClass("input-warning"); |
| 862 |
} else { |
887 |
} else { |
| 863 |
$("#barcode").removeClass("alert"); |
888 |
$("#barcode").removeClass("input-warning"); |
| 864 |
} |
889 |
} |
| 865 |
}); |
890 |
}); |
| 866 |
$("#barcode").blur(function () { |
891 |
$("#barcode").blur(function () { |
| 867 |
$("#barcode").removeClass("alert"); |
892 |
$("#barcode").removeClass("input-warning"); |
| 868 |
}); |
893 |
}); |
| 869 |
[% END %] |
894 |
[% END %] |
| 870 |
|
895 |
|