From fa745c3b1d13643e08cacd0cf3a0cb10d25fd8ec Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 19 Feb 2024 10:31:19 +0000 Subject: [PATCH] Bug 35532: Remove shortcut buttons from flatpickr It doesn't make sense to have the shortcut buttons in the range picker for bookings. This patch adds the ability to remove them entirely from display and uses that option in the bookings modal. Signed-off-by: David Nind Signed-off-by: Nick Clemens Signed-off-by: Katrin Fischer --- koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc | 3 +++ .../intranet-tmpl/prog/en/includes/modals/place_booking.inc | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc index f027552053..9889985181 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc @@ -181,6 +181,9 @@ options['dateFormat'] = "Y-m-d H:i"; options['altFormat'] = flatpickr_dateformat_string + " " + flatpickr_timeformat_string; } + if ( $(input).data('flatpickr-disable-shortcuts') === true ) { + options['plugins'] = []; + } let fp = $(input).flatpickr(options); diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/modals/place_booking.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/modals/place_booking.inc index 0345164eea..adaea50c76 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/modals/place_booking.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/modals/place_booking.inc @@ -33,7 +33,7 @@
  • - + Required
    Select the booking start and end date
    -- 2.39.5