From f5c7e3fd76f3d08b7b7ed2090f4d822bd3f2e3de Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 4 May 2020 11:33:11 +0000 Subject: [PATCH] Bug 25133: (follow-up) Move changes to timepicker.inc Witht the changes in calendar.inc there can be a js error where the timepicker is not included. Moving the changes to timepicker.inc should resolve this Note: in previous patches the amnames/pmnames were removed. It is possible they had no effect because they were declared in two files, so I have left them in timepicker.inc Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize Signed-off-by: Joy Nelson --- koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc | 4 ---- koha-tmpl/intranet-tmpl/prog/en/includes/timepicker.inc | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc index 5161f39afb..85ec55b7ad 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc @@ -122,10 +122,6 @@ jQuery(function($){ showMonthAfterYear: false, yearSuffix: ''}; $.datepicker.setDefaults($.datepicker.regional['']); - $.timepicker.regional[''] = { - timeFormat: "[% IF Koha.Preference('TimeFormat') == '12hr' %]hh:mm TT[% ELSE %]HH:mm[% END %]", - }; - $.timepicker.setDefaults($.timepicker.regional['']); }); /* jQuery Validator plugin custom method diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/timepicker.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/timepicker.inc index 04f5d3dbc8..9fe004efc4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/timepicker.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/timepicker.inc @@ -2,6 +2,7 @@ /* Localization of the timepicker plugin */ jQuery(function($){ $.timepicker.regional[''] = { + timeFormat: "[% IF Koha.Preference('TimeFormat') == '12hr' %]hh:mm TT[% ELSE %]HH:mm[% END %]", currentText: _("Now"), closeText: _("Done"), amNames: [_("AM"), _("A")], -- 2.39.2