From ce4ab12a3cac55db65839dadacd84ada27db2091 Mon Sep 17 00:00:00 2001 From: Shi Yao Wang Date: Tue, 30 Apr 2024 15:02:50 -0400 Subject: [PATCH] Bug 36738: Don't copy date when repeating date fields 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 Follow up for bug 32610 (https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32610) Signed-off-by: David Nind Signed-off-by: Katrin Fischer --- 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.39.5