From a09b3b80bcdad6866ada06cf994feabdaf5d8668 Mon Sep 17 00:00:00 2001 From: Shi Yao Wang Date: Tue, 30 Apr 2024 15:02:50 -0400 Subject: [PATCH] Bug 36738: Date attributes follow-ups Make the repeatable date patron attribute empty when repeating the inputs to avoid date formatting problems (and keeping past date value after repeating is not something we want) Test plan: 1- create a patron attribute type with is a date and repeatable checked (administration -> patron attribute types) 2- add a couple of patron attribute of type date, notice the repeated inputs contain previous data 3- Apply the patch 4- redo step 2 and notice the repeated inputs are empty https://bugs.koha-community.org/show_bug.cgi?id=32610 --- koha-tmpl/intranet-tmpl/prog/js/members.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/members.js b/koha-tmpl/intranet-tmpl/prog/js/members.js index 7e4806fa23..2f58cb888c 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/members.js +++ b/koha-tmpl/intranet-tmpl/prog/js/members.js @@ -60,11 +60,9 @@ function clone_entry(node) { // regenerate flatpickr calendars to add event listeners $(`.flatpickr_wrapper`, clone).remove(); - var date = $("> .flatpickr", original).val(); $(".flatpickr", clone).each(function(){ apply_flatpickr(this); }); - $(`.flatpickr_wrapper .flatpickr, #patron_attr_${newId}.flatpickr`, clone).val(date); return false; } -- 2.34.1