Bugzilla – Attachment 148787 Details for
Bug 33345
On-site checkout checkbox does not work since issue date using flatpickr
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33345: On-site checkout checkbox does not work since issue date using flatpickr
Bug-33345-On-site-checkout-checkbox-does-not-work-.patch (text/plain), 2.60 KB, created by
Fridolin Somers
on 2023-03-27 21:48:37 UTC
(
hide
)
Description:
Bug 33345: On-site checkout checkbox does not work since issue date using flatpickr
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2023-03-27 21:48:37 UTC
Size:
2.60 KB
patch
obsolete
>From 6cc57e809f5b5595631b386f88ea9caf759d4499 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >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 > >Since Bug 30718, date due uses flatpickr. >The JavaScript code setting due date via on-site checkout checkbox needs to be adapted. >Sort of like Bug 30717. > >This patch renames the variable sent to template >'today_due_date_and_time' to avoid confusion with variable 'todaysdate' >used in other templates. > >Test plan : >1) Enable system preference 'OnSiteCheckouts' >2) Go to a patron circulation page /cgi-bin/koha/circ/circulation.pl >3) Click on settings icon inside barcode input >=> Check due date input is empty >4) Click on 'On-site checkout' >=> Check due date input is filled with today date at 23:59 >5) Fill barcode input and do check-out >6) Check due date is correct >--- > 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..7fa5918048 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; >+ duedatespec_fp.setDate("[% today_due_date_and_time | $KohaDates dateformat => 'iso', with_hours => 1 %]"); > } > } > >-- >2.39.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33345
:
148786
|
148787
|
149298
|
149363