View | Details | Raw Unified | Return to bug 20959
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss (-8 / +16 lines)
Lines 483-493 input { Link Here
483
        }
483
        }
484
    }
484
    }
485
485
486
    &.alert {
487
        background-color: #FFFF99;
488
        border-color: #900;
489
    }
490
491
    &.submit {
486
    &.submit {
492
        @include default-button;
487
        @include default-button;
493
488
Lines 506-511 input { Link Here
506
    }
501
    }
507
}
502
}
508
503
504
.input-warning {
505
    background-color: #FFFF99;
506
    border-color: #900;
507
}
508
509
label,
509
label,
510
.label {
510
.label {
511
    color: #000;
511
    color: #000;
Lines 1909-1915 i { Link Here
1909
    }
1909
    }
1910
}
1910
}
1911
1911
1912
.checkout-setting {
1912
.circ-setting {
1913
    font-size: 85%;
1913
    font-size: 85%;
1914
    padding-top: .3em;
1914
    padding-top: .3em;
1915
1915
Lines 1923-1929 i { Link Here
1923
    }
1923
    }
1924
}
1924
}
1925
1925
1926
.checkout-settings {
1926
.circ-settings {
1927
    background-color: #F4F8F9;
1927
    background-color: #F4F8F9;
1928
    border-radius: 0;
1928
    border-radius: 0;
1929
    border-top: 2px solid #B9D8D9;
1929
    border-top: 2px solid #B9D8D9;
Lines 1934-1943 i { Link Here
1934
    padding: 1em 1em 0;
1934
    padding: 1em 1em 0;
1935
}
1935
}
1936
1936
1937
#show-checkout-settings {
1937
#show-circ-settings {
1938
    margin-top: .5em;
1938
    margin-top: .5em;
1939
}
1939
}
1940
1940
1941
.checkin-active-setting {
1942
    background-color: #FFC;
1943
    border-radius: 3px;
1944
    margin: .5em;
1945
    padding: .5em;
1946
    box-shadow: 1px 1px 2px 0 rgba(102, 102, 102, .5);
1947
}
1948
1941
.blocker {
1949
.blocker {
1942
    color: #990000;
1950
    color: #990000;
1943
}
1951
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-8 / +8 lines)
Lines 527-541 No patron matched <span class="ex">[% message | html %]</span> Link Here
527
    [% END %]
527
    [% END %]
528
    <button type="submit" class="btn btn-default">Check out</button>
528
    <button type="submit" class="btn btn-default">Check out</button>
529
529
530
    <div id="show-checkout-settings">
530
    <div id="show-circ-settings">
531
        <a href="#"><i class="fa fa-caret-right checkout-settings-icon"></i> Checkout settings</a>
531
        <a href="#"><i class="fa fa-caret-right circ-settings-icon"></i> Checkout settings</a>
532
    </div>
532
    </div>
533
533
534
    <div class="checkout-settings">
534
    <div class="circ-settings">
535
535
536
        [% UNLESS ( noissues && Koha.Preference('OnSiteCheckoutsForce') ) %]
536
        [% UNLESS ( noissues && Koha.Preference('OnSiteCheckoutsForce') ) %]
537
            [% IF ( SpecifyDueDate ) %]
537
            [% IF ( SpecifyDueDate ) %]
538
                <div id="specify-due-date" class="checkout-setting">
538
                <div id="specify-due-date" class="circ-setting">
539
                    <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
539
                    <div class="hint">Specify due date [% INCLUDE 'date-format.inc' %]: </div>
540
                    [% IF ( duedatespec ) %]
540
                    [% IF ( duedatespec ) %]
541
                        <input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec | html %]" />
541
                        <input type="text" size="13" id="duedatespec" name="duedatespec" value="[% duedatespec | html %]" />
Lines 554-560 No patron matched <span class="ex">[% message | html %]</span> Link Here
554
        [% END %]
554
        [% END %]
555
555
556
        [% UNLESS ( noissues ) %]
556
        [% UNLESS ( noissues ) %]
557
            <div id="set-automatic-renewal" class="checkout-setting">
557
            <div id="set-automatic-renewal" class="circ-setting">
558
                [% IF NEEDSCONFIRMATION %]
558
                [% IF NEEDSCONFIRMATION %]
559
                    <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" />
559
                    <input type="checkbox" name="auto_renew" id="auto_renew" value="auto_renew" disabled="disabled" />
560
                [% ELSE %]
560
                [% ELSE %]
Lines 564-570 No patron matched <span class="ex">[% message | html %]</span> Link Here
564
                <label for="auto_renew">Automatic renewal</label>
564
                <label for="auto_renew">Automatic renewal</label>
565
            </div>
565
            </div>
566
            [% IF Koha.Preference('decreaseLoanHighHolds') %]
566
            [% IF Koha.Preference('decreaseLoanHighHolds') %]
567
                <div id="set_high_holds_overrride" class="checkout-setting">
567
                <div id="set_high_holds_overrride" class="circ-setting">
568
                    [% IF NEEDSCONFIRMATION %]
568
                    [% IF NEEDSCONFIRMATION %]
569
                        [% IF override_high_holds %]
569
                        [% IF override_high_holds %]
570
                            <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" disabled="disabled" checked="checked"/>
570
                            <input type="checkbox" name="override_high_holds" id="override_high_holds" value="1" disabled="disabled" checked="checked"/>
Lines 584-590 No patron matched <span class="ex">[% message | html %]</span> Link Here
584
        [% END %]
584
        [% END %]
585
585
586
        [% IF Koha.Preference('OnSiteCheckouts') %]
586
        [% IF Koha.Preference('OnSiteCheckouts') %]
587
            <div id="onsite_checkout-select" class="checkout-setting">
587
            <div id="onsite_checkout-select" class="circ-setting">
588
                [% IF noissues %]
588
                [% IF noissues %]
589
                    <div class="onsite-checkout-only">
589
                    <div class="onsite-checkout-only">
590
                        <input type="checkbox" id="onsite_checkout" name="onsite_checkout_forced" checked="checked" disabled="disabled" /> <label for="onsite_checkout">On-site checkouts only. Automatic due date: </label>
590
                        <input type="checkbox" id="onsite_checkout" name="onsite_checkout_forced" checked="checked" disabled="disabled" /> <label for="onsite_checkout">On-site checkouts only. Automatic due date: </label>
Lines 597-603 No patron matched <span class="ex">[% message | html %]</span> Link Here
597
            </div>
597
            </div>
598
        [% END %]
598
        [% END %]
599
599
600
    </div> <!-- /.checkout-settings -->
600
    </div> <!-- /.circ-settings -->
601
601
602
          <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber | html %]" />
602
          <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber | html %]" />
603
          <input type="hidden" name="branch" value="[% branch | html %]" />
603
          <input type="hidden" name="branch" value="[% branch | html %]" />
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (-71 / +96 lines)
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
(-)a/koha-tmpl/intranet-tmpl/prog/js/pages/circulation.js (-15 / +14 lines)
Lines 54-79 $(document).ready(function() { Link Here
54
        return false;
54
        return false;
55
    });
55
    });
56
56
57
    var checkout_settings = $(".checkout-settings");
57
    var circ_settings = $(".circ-settings");
58
    var checkout_settings_icon = $(".checkout-settings-icon");
58
    var circ_settings_icon = $(".circ-settings-icon");
59
59
60
    // If any checkboxes in the checkout settings are selected, show the settings by default
60
    // If any checkboxes in the circ settings are selected, show the settings by default
61
    if ( $(".checkout-settings input:checked,#duedatespec[value!='']").length ) {
61
    if ( $(".circ-settings input:checked,#duedatespec[value!='']").length ) {
62
        checkout_settings.show();
62
        circ_settings.show();
63
        checkout_settings_icon.removeClass("fa-caret-right").addClass("fa-caret-down");
63
        circ_settings_icon.removeClass("fa-caret-right").addClass("fa-caret-down");
64
    } else {
64
    } else {
65
        checkout_settings.hide();
65
        circ_settings.hide();
66
        checkout_settings_icon.removeClass("fa-caret-down").addClass("fa-caret-right");
66
        circ_settings_icon.removeClass("fa-caret-down").addClass("fa-caret-right");
67
    }
67
    }
68
68
69
    $("#show-checkout-settings a").on("click",function(){
69
    $("#show-circ-settings a").on("click",function(){
70
        if( checkout_settings.is(":hidden")){
70
        if( circ_settings.is(":hidden")){
71
            checkout_settings.show();
71
            circ_settings.show();
72
            checkout_settings_icon.removeClass("fa-caret-right").addClass("fa-caret-down");
72
            circ_settings_icon.removeClass("fa-caret-right").addClass("fa-caret-down");
73
        } else {
73
        } else {
74
            $("#barcode").focus();
74
            $("#barcode").focus();
75
            checkout_settings.hide();
75
            circ_settings.hide();
76
            checkout_settings_icon.removeClass("fa-caret-down").addClass("fa-caret-right");
76
            circ_settings_icon.removeClass("fa-caret-down").addClass("fa-caret-right");
77
        }
77
        }
78
    });
78
    });
79
79
80
- 

Return to bug 20959