From da69622ecafd37364840f98dcc5809ded81c829c Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Mon, 27 Mar 2023 11:29:01 -1000 Subject: [PATCH] Bug 33345: On-site checkout checkbox does not work since issue date using flatpickr WIP --- circ/circulation.pl | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 2cd85b6dad..5cbea04237 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -626,7 +626,7 @@ $template->param( debt_confirmed => $debt_confirmed, SpecifyDueDate => $duedatespec_allow, PatronAutoComplete => C4::Context->preference("PatronAutoComplete"), - todaysdate => dt_from_string()->set(hour => 23)->set(minute => 59), + today_due_date_and_time => dt_from_string()->set(hour => 23)->set(minute => 59), restriction_types => scalar Koha::Patron::Restriction::Types->search(), has_modifications => $has_modifications, override_high_holds => $override_high_holds, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index ffb0a930d8..b608a0f7b2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -1093,7 +1093,8 @@ // On-site checkout function toggle_onsite_checkout(){ if ( $("#onsite_checkout").prop('checked') ) { - $("#duedatespec").val("[% todaysdate | $KohaDates with_hours => 1 %]") + const duedatespec_fp = document.querySelector("#duedatespec")._flatpickr; + estimated_delivery_date.setDate("[% today_due_date_and_time | $KohaDates with_hours => 1 %]"); } } -- 2.39.0