From 4c3ef3b69d4660843261669f01a53c4d908ab270 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Thu, 16 May 2024 11:46:08 +0000 Subject: [PATCH] Bug 36882: Reapply flatpickr to cloned entry 1) Add a patron attribute type: http://localhost:8081/cgi-bin/koha/admin/patron-attr-types.pl?op=add_attribute_type 2) Make sure its repeatable + is_date 3) Visit overdues: http://localhost:8081/cgi-bin/koha/circ/overdue.pl 4) Click the 'add' button under the date custom attribute 5) Click on the newly created input, notice the flatpickr pop up doesnt show 6) Apply patch. Repeat. Signed-off-by: Owen Leonard Signed-off-by: Marcel de Rooy Signed-off-by: Katrin Fischer --- koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt index ba8169a062..f81da9f95f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/overdue.tt @@ -307,6 +307,10 @@ clone.find(".select2").remove(); original.after( clone ); $("#" + appendid ).select2(); + } else if( clone.find(".flatpickr").length ){ + clone.attr("id", appendid ); + original.after( clone ); + apply_flatpickr(clone.find(".flatpickr")); } else { clone.attr("id", appendid ); original.after( clone ); -- 2.39.5