From 712be5b41fdbc0b9f75ad747745628cc5da2d873 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 26 Oct 2021 18:19:27 +0000 Subject: [PATCH] Bug 29229: (follow-up) Update method for linking flatpickr fields Signed-off-by: Jonathan Druart --- .../prog/en/modules/suggestion/suggestion.tt | 51 +++---------------- 1 file changed, 6 insertions(+), 45 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt index 4981a4ac53..21dd043e47 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt @@ -1116,11 +1116,11 @@
  • - +
  • - +
  • @@ -1137,11 +1137,11 @@
  • - +
  • - +
  • @@ -1158,11 +1158,11 @@
  • - +
  • - +
  • @@ -1353,45 +1353,6 @@ return false; }); - /* Suggested date fields */ - var suggesteddate_from = $("#suggesteddate_from").flatpickr({ - onClose: function( selectedDates, dateText, instance) { - validate_date( selectedDates, instance ); - suggesteddate_to.set('minDate', selectedDates[0]); - } - }); - var suggesteddate_to = $("#suggesteddate_to").flatpickr({ - onClose: function( selectedDates, dateText, instance) { - validate_date( selectedDates, instance ); - }, - }); - - /* Managed date fields */ - var manageddate_from = $("#manageddate_from").flatpickr({ - onClose: function( selectedDates, dateText, instance) { - validate_date( selectedDates, instance ); - manageddate_to.set('minDate', selectedDates[0]); - } - }); - var manageddate_to = $("#manageddate_to").flatpickr({ - onClose: function( selectedDates, dateText, instance) { - validate_date( selectedDates, instance ); - }, - }); - - /* Accepted date fields */ - var accepteddate_from = $("#accepteddate_from").flatpickr({ - onClose: function( selectedDates, dateText, instance) { - validate_date( selectedDates, instance ); - accepteddate_to.set('minDate', selectedDates[0]); - } - }); - var accepteddate_to = $("#accepteddate_to").flatpickr({ - onClose: function( selectedDates, dateText, instance) { - validate_date( selectedDates, instance ); - }, - }); - $("button[type='submit']").on("click", function(e) { var submit_button = this; var form = $(submit_button).parents("form"); -- 2.39.5