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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-6 / +8 lines)
Lines 1040-1050 Link Here
1040
1040
1041
        // On-site checkout
1041
        // On-site checkout
1042
        function toggle_onsite_checkout(){
1042
        function toggle_onsite_checkout(){
1043
            const duedatespec_fp = document.querySelector("#duedatespec")._flatpickr;
1043
            const duedatespec = document.querySelector("#duedatespec");
1044
            if ( $("#onsite_checkout").prop('checked') ) {
1044
            if( duedatespec ){
1045
                duedatespec_fp.setDate("[% today_due_date_and_time | $KohaDates dateformat => 'iso', with_hours => 1 %]");
1045
                const duedatespec_fp = duedatespec._flatpickr;
1046
            } else {
1046
                if ( $("#onsite_checkout").prop('checked') ) {
1047
                duedatespec_fp.setDate("");
1047
                    duedatespec_fp.setDate("[% today_due_date_and_time | $KohaDates dateformat => 'iso', with_hours => 1 %]");
1048
                } else {
1049
                    duedatespec_fp.setDate("");
1050
                }
1048
            }
1051
            }
1049
        }
1052
        }
1050
1053
1051
- 

Return to bug 36494