From 6733535c52320679d517d88fabc71e74792beddf Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 17 Apr 2020 12:11:25 +0200 Subject: [PATCH] Bug 25133: Fix time part of due date for 12hr With Timeformat system preference set to 12 hours format: Prior to 19.05.08, when due date was specified at checkout, the time in the box would show in 24hr format (e.g. 15:59) while the due date in the patron's checkouts would show in 12hr format (e.g. 3:59 PM). After 19.05.08, the format in the specify a due date box shows in 24hr format and the due date in 12hr format (in patron checkouts) as before. But when checking out multiple items using the specify due date option for the session, the time changes from PM to AM. To test: - Check out an item with specified due date 15:50 PM - Check out a second item in same transaction - Verify date changed to AM - Apply patch - Repeat - Verify this time the date is kept as set Signed-off-by: Nick Clemens Signed-off-by: Kelly McElligott Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize Signed-off-by: Joy Nelson (cherry picked from commit 1973003eaafd4cc7f7040cc66f946751eb2bacc3) Signed-off-by: Lucas Gass --- koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc | 6 ++++++ .../intranet-tmpl/prog/en/modules/circ/circulation.tt | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc index e6f12ddce0..aca8bee7b6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc @@ -122,6 +122,12 @@ jQuery(function($){ showMonthAfterYear: false, yearSuffix: ''}; $.datepicker.setDefaults($.datepicker.regional['']); + $.timepicker.regional[''] = { + timeFormat: "[% IF Koha.Preference('TimeFormat') == '12hr' %]hh:mm TT[% ELSE %]HH:mm[% END %]", + amNames: ['AM', 'A'], + pmNames: ['PM', 'P'], + }; + $.timepicker.setDefaults($.timepicker.regional['']); }); /* jQuery Validator plugin custom method diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index bf9359712f..8a299e32d1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -217,6 +217,14 @@

[% END %] + [% IF ( INVALID_DATE ) %] +

+ + +

+ [% ELSE %] + + [% END %] [% IF ( RESERVED ) %]

-- 2.39.5