From a6985d167e11eaafee985b51cb0188a693405af5 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 --- 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 dc7ee942bf..5b4f809b8f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc @@ -123,10 +123,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 534c4b1e16..2bcb38df7e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/timepicker.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/timepicker.inc @@ -3,6 +3,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.5