Bugzilla – Attachment 127139 Details for
Bug 28982
Use Flatpickr on onboarding pages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28982: (follow-up) Ensure that date format is correctly checked
Bug-28982-follow-up-Ensure-that-date-format-is-cor.patch (text/plain), 2.16 KB, created by
Katrin Fischer
on 2021-10-31 13:54:55 UTC
(
hide
)
Description:
Bug 28982: (follow-up) Ensure that date format is correctly checked
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2021-10-31 13:54:55 UTC
Size:
2.16 KB
patch
obsolete
>From 75c73acc2484d1121ad8cd62b355fd141fba217a Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 4 Oct 2021 17:33:31 +0000 >Subject: [PATCH] Bug 28982: (follow-up) Ensure that date format is correctly > checked > >This patch modifies the global calendar include so that it doesn't use >the potentially-undefined template variable "dateformat." > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../intranet-tmpl/prog/en/includes/calendar.inc | 21 +++++++++++++++++++-- > 1 file changed, 19 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >index bd8c9e7b86..99ebc19098 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >@@ -6,8 +6,25 @@ > <script> > var debug = "[% debug | html %]"; > var dateformat_pref = "[% Koha.Preference('dateformat ') | html %]"; >- var dateformat_string = [% IF ( dateformat == "us" ) %]"mm/dd/yy"[% ELSIF ( dateformat == "metric" ) %]"dd/mm/yy"[% ELSIF ( dateformat == "dmydot" ) %]"dd.mm.yy"[% ELSE %]"yy-mm-dd"[% END %]; >- var flatpickr_dateformat_string = [% IF ( dateformat == "us" ) %]"m/d/Y"[% ELSIF ( dateformat == "metric" ) %]"d/m/Y"[% ELSIF ( dateformat == "dmydot" ) %]"d.m.Y"[% ELSE %]"Y-m-d"[% END %]; >+ var dateformat_string = ""; >+ var flatpickr_dateformat_string = ""; >+ switch ( dateformat_pref ){ >+ case "us": >+ dateformat_string = "mm/dd/yy"; >+ flatpickr_dateformat_string = "m/d/Y"; >+ break; >+ case "metric": >+ dateformat_string = "dd/mm/yy"; >+ flatpickr_dateformat_string = "d/m/Y"; >+ break; >+ case "dmydot": >+ dateformat_string = "dd.mm.yy"; >+ flatpickr_dateformat_string = "d.m.Y"; >+ break; >+ default: >+ dateformat_string = "yy-mm-dd"; >+ flatpickr_dateformat_string = "Y-m-d"; >+ } > var sentmsg = 0; > var bidi = [% IF(bidi) %] true[% ELSE %] false[% END %]; > var calendarFirstDayOfWeek = '[% Koha.Preference('CalendarFirstDayOfWeek') | html %]'; >-- >2.11.0
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 28982
:
124716
|
125503
|
125656
|
125710
|
127138
| 127139