Bugzilla – Attachment 127699 Details for
Bug 29394
Remove flatpickr instantiations from .tt files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29394: (follow-up) Pass correct time format and other corrections
Bug-29394-follow-up-Pass-correct-time-format-and-o.patch (text/plain), 4.76 KB, created by
Owen Leonard
on 2021-11-16 16:50:29 UTC
(
hide
)
Description:
Bug 29394: (follow-up) Pass correct time format and other corrections
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-11-16 16:50:29 UTC
Size:
4.76 KB
patch
obsolete
>From 2a6b1b1901f484e77c0c53894ad3d7dab10af8e9 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 16 Nov 2021 16:46:44 +0000 >Subject: [PATCH] Bug 29394: (follow-up) Pass correct time format and other > corrections > >This patch makes a few corrections, including adding the >correct Flatpickr date format option when the timepicker is enabled. > >The patch also corrects a couple of places where the wrong date field >was modified with the new data attributes. > >To test, apply the patch and test the datepickers on the batch checkout >and renew pages. When you select a date and time the "TimeFormat" system >preference should be correctly applied. >--- > koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc | 1 + > .../prog/en/modules/circ/circulation_batch_checkouts.tt | 6 +----- > koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt | 8 ++------ > 3 files changed, 4 insertions(+), 11 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >index f67bffe313..01a822381a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >@@ -98,6 +98,7 @@ > } > if ( $(this).data('flatpickr-enable-time') === true ) { > options['enableTime'] = true; >+ options['dateFormat'] = flatpickr_dateformat_string + " " + flatpickr_timeformat_string; > } > > $(this).flatpickr(options); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt >index dc584eabdc..7f05904fae 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt >@@ -112,11 +112,7 @@ > <fieldset class="rows"> > <legend>Due date: </legend> > <label for="duedatespec">Hard due date [% INCLUDE 'date-format.inc' %]:</label> >- [% IF Koha.Preference('SpecifyDueDate') %] >- <input type="text" size="20" id="duedatespec" name="duedatespec" value="[% duedatespec | $KohaDates with_hours => 1 %]" class="flatpickr" data-flatpickr-enable-time="true" /> >- [% ELSE %] >- <input type="text" size="20" id="duedatespec" name="duedatespec" value="[% duedatespec | $KohaDates with_hours => 1 %]" /> >- [% END %] >+ <input type="text" size="20" id="duedatespec" name="duedatespec" value="[% duedatespec | $KohaDates with_hours => 1 %]" class="flatpickr" data-flatpickr-enable-time="true" /> > </fieldset> > [% END %] > <input type="hidden" name="op" value="show" /> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt >index 499c09bd27..f01cfb8221 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt >@@ -171,11 +171,7 @@ > [% END %] > > <form method="get" action="/cgi-bin/koha/circ/renew.pl"> >- [% IF Koha.Preference('SpecifyDueDate') %] >- <input type="hidden" name="hard_due_date" value="[% hard_due_date | html %]" class="flatpickr flatpickr-enable-time" /> >- [% ELSE %] >- <input type="hidden" name="hard_due_date" value="[% hard_due_date | html %]" /> >- [% END %] >+ <input type="hidden" name="hard_due_date" value="[% hard_due_date | html %]" /> > <button type="submit" class="deny"><i class="fa fa-times"></i> Continue without renewing</button> > </form> > </div> >@@ -224,7 +220,7 @@ > <div class="circ-settings show"> > <div class="date-select" id="renew_date_override_fields"> > <div><label for="hard_due_date" class="hint">Renewal due date [% INCLUDE 'date-format.inc' %]:</label></div> >- <input type="text" size="20" id="hard_due_date" name="hard_due_date" value="[% hard_due_date | $KohaDates with_hours => 1 %]" /> >+ <input type="text" size="20" id="hard_due_date" name="hard_due_date" value="[% hard_due_date | $KohaDates with_hours => 1 %]" class="flatpickr" data-flatpickr-futuredate="true" data-flatpickr-enable-time="true" /> > </div> <!-- /.date-select --> > </div> > </fieldset> >-- >2.20.1
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 29394
:
127683
|
127699
|
127700
|
127707
|
127715
|
127716
|
127717
|
127718
|
127719
|
127723
|
127724
|
127725
|
127726