@@ -, +, @@ blocked from checking out - Go to Circulation and check out to a patron. - Under the restrictions tab, add a manual restriction. - When the page reloads and the checkout form is no longer visible, confirm that there is no error in the browser console. --- .../prog/en/modules/circ/circulation.tt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -1040,11 +1040,14 @@ // On-site checkout function toggle_onsite_checkout(){ - const duedatespec_fp = document.querySelector("#duedatespec")._flatpickr; - if ( $("#onsite_checkout").prop('checked') ) { - duedatespec_fp.setDate("[% today_due_date_and_time | $KohaDates dateformat => 'iso', with_hours => 1 %]"); - } else { - duedatespec_fp.setDate(""); + const duedatespec = document.querySelector("#duedatespec"); + if( duedatespec ){ + const duedatespec_fp = duedatespec._flatpickr; + if ( $("#onsite_checkout").prop('checked') ) { + duedatespec_fp.setDate("[% today_due_date_and_time | $KohaDates dateformat => 'iso', with_hours => 1 %]"); + } else { + duedatespec_fp.setDate(""); + } } } --