Bugzilla – Attachment 134752 Details for
Bug 30706
DateFormat change only takes effect after a restart of services
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30706: Fix space in check for dateformat preference
Bug-30706-Fix-space-in-check-for-dateformat-prefer.patch (text/plain), 2.92 KB, created by
David Nind
on 2022-05-06 16:19:53 UTC
(
hide
)
Description:
Bug 30706: Fix space in check for dateformat preference
Filename:
MIME Type:
Creator:
David Nind
Created:
2022-05-06 16:19:53 UTC
Size:
2.92 KB
patch
obsolete
>From 2d2ddf6c0507b84f3147a7f1f9d723c02d0783a7 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 6 May 2022 13:31:31 +0000 >Subject: [PATCH] Bug 30706: Fix space in check for dateformat preference > >This patch fixes the calendar.inc includes in both staff and OPAC in >order to remove a typo: An extra space in the check for the "dateformat" >system preference. > >The result of this error is that changes to the dateformat system >preference will not be correctly applied to Koha without a restart. > >To reproduce the problem start the process of creating a new patron. > > - In the date of birth field, select a date. The format of the date > inserted should match your current dateformat system preference. > - Go to Administration -> System preferences and update dateformat to > something different. > - Go back to the patron creation form (refresh it if necessary). > - The hint under the Date of birth field will match your updated system > preference, but when you pick a date using the calendar widget it > will still be formatted according to the old value of dateformat. > >To test the fix, apply the patch and run through the same steps above. >A change the dateformat preference should be immediately reflected in >the functionality of the calendar widget. > >Signed-off-by: David Nind <david@davidnind.com> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc | 2 +- > koha-tmpl/opac-tmpl/bootstrap/en/includes/calendar.inc | 2 +- > 2 files changed, 2 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 549d046cd7..47a3f76ec2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc >@@ -5,7 +5,7 @@ > [% FILTER collapse %] > <script> > var debug = "[% debug | html %]"; >- var dateformat_pref = "[% Koha.Preference('dateformat ') | html %]"; >+ var dateformat_pref = "[% Koha.Preference('dateformat') | html %]"; > var flatpickr_dateformat_string = ""; > switch ( dateformat_pref ){ > case "us": >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/calendar.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/calendar.inc >index 2cb09f2a1b..8a4877f9f4 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/calendar.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/calendar.inc >@@ -12,7 +12,7 @@ > longhand: [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"] > }; > var debug = "[% debug | html %]"; >- var dateformat_pref = "[% Koha.Preference('dateformat ') | html %]"; >+ var dateformat_pref = "[% Koha.Preference('dateformat') | html %]"; > var sentmsg = 0; > if (debug > 1) {alert("dateformat: " + dateformat_pref + "\ndebug is on (level " + debug + ")");} > var calendarFirstDayOfWeek = '[% Koha.Preference('CalendarFirstDayOfWeek') | html %]'; >-- >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 30706
:
134739
|
134752
|
134770