Bugzilla – Attachment 162275 Details for
Bug 35532
Use of calendar for date range in bookings is not clear
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35532: Remove shortcut buttons from flatpickr
Bug-35532-Remove-shortcut-buttons-from-flatpickr.patch (text/plain), 2.42 KB, created by
David Nind
on 2024-02-19 14:40:58 UTC
(
hide
)
Description:
Bug 35532: Remove shortcut buttons from flatpickr
Filename:
MIME Type:
Creator:
David Nind
Created:
2024-02-19 14:40:58 UTC
Size:
2.42 KB
patch
obsolete
>From 8d5811a4058347598679f5996fa0ef95eabde415 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >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 <david@davidnind.com> >--- > 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 0ff2928750..c3dbfd6fdc 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 @@ > <li> > <div id="period_fields"> > <label class="required" for="period">Booking dates: </label> >- <input type="text" id="period" name="period" class="flatpickr" data-flatpickr-futuredate="true" required="required" disabled="true" autocomplete="off"> >+ <input type="text" id="period" name="period" class="flatpickr" data-flatpickr-futuredate="true" data-flatpickr-disable-shortcuts="true" required="required" disabled="true" autocomplete="off"> > <span class="required">Required</span> > </div> > <div class="hint">Select the booking start and end date</div> >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35532
:
160857
|
162266
|
162267
|
162274
|
162275
|
162844
|
162845