]> git.koha-community.org Git - koha.git/commit
Bug 35341: Improve processing hard due date and auto renewal date
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 17 Nov 2023 10:18:01 +0000 (10:18 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Fri, 2 Feb 2024 18:01:06 +0000 (18:01 +0000)
commitb71d875d5e395760d08623cd118a7045afb18772
tree0807f20f311b1f0e1b25fde416a5e5a576e78687
parent1129a79d3873f8773c1402de5998b990c612a495
Bug 35341: Improve processing hard due date and auto renewal date

After quite a struggle, came up with this approach using
flatpickr's parseDate and setDate. Seems to be the best.
The dateformat variable is set in calendar.inc.

Test plan:
Test edit, save, clear rules, focus on both dates.
Toggle all I18N preference date formats.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Bug 35341: Do not reinstantiate flatpickr

We do not need to reinstantiate flatpickr, we need to retrieve the
existing instance.

Test plan:
See previous patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
12-01-2024 Squashed both patches. Removed the unused hidden inputs for
hardduedatecompare and added a data attribute for the duedate.
The check with is_valid_date seems no longer needed here. Normally
date is empty or valid. A js warning from parseDate should be
exceptional. Made code for both dates a bit more consistent.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 963a3a47155cf313d25af6ba10781f4e7922f4dc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 7f416ac227f6e8891e52a511d4ca40dfe80efb53)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt