From b46220cbc752c30cec8baab72aa6009f470fcfc8 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Thu, 9 Feb 2023 22:36:13 +0000 Subject: [PATCH] Bug 31057: Add hint to the 'To date' input on the calendar form Just adding a hint using the 'hint' class didn't work as expected here. The hint was immediately hidden. That is because of the collapsable hint text for the option at the bottom of the form using the [?] link. So I chose to use the class of the [$] to make the script a little more selective. To test: * Go to the calendar tool * Test that the [$] hide/show different help texts * Apply patch * Verify a hint now shows below the "To date" * Verify that the help texts still function as before Signed-off-by: Matt Blenkinsop Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt index 7cf6e11e92..a5800decbb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt @@ -175,6 +175,7 @@
  • To date: +
    This field only applies when holidays are added on a range.
  • @@ -578,7 +579,7 @@ $(document).ready(function() { - $(".hint").hide(); + $(".helptext + .hint").hide(); $("#branch").change(function(){ changeBranch(); }); @@ -606,7 +607,7 @@ }); $("a.helptext").click(function(){ - $(this).parent().find(".hint").toggle(); return false; + $(this).parent().find(".helptext + .hint").toggle(); return false; }); const dateofrange = document.querySelector("#dateofrange")._flatpickr; -- 2.39.5