From 683d6ced64a92cc391ac81b4a046bcdf2110bb83 Mon Sep 17 00:00:00 2001 From: Emmi Takkinen Date: Mon, 5 Oct 2020 11:19:44 +0300 Subject: [PATCH] Bug 9118: Do not show option to create exception on range for unique holiday When an unique holiday is edited one can choose option 'Generate exceptions on a range of dates.' Exceptions are meant to be used with repeating holidays and it makes no sense to have option to be able to create one for an unique holiday. This patch hides exception on range option when editing an unique holiday. Also fixes a minor spelling error. To test: 1. Create unique holiday and edit it. 2. Note that option to create exception on range is shown. 3. Apply patch. => Option is now hidden. Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- .../prog/en/modules/tools/holidays.tt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 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 62142d8dd6..99d91ad0f1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt @@ -83,16 +83,17 @@ td.repeatableyearly a.ui-state-default { background: #FFCC66 none; color : Bl -
  • +
  • [?]
    You can make an exception for this holiday rule. This means that you will be able to say that for a repeatable holiday there is one day which is going to be an exception.
  • -
  • +
  • + [?]
    You can make an exception on a range of dates repeated yearly.
    -
  • +
  • [?]
    This will delete this holiday rule. If it is a repeatable holiday, this option checks for possible exceptions. If an exception exists, this option will remove the exception and set the date to a regular holiday.
  • @@ -383,7 +384,7 @@ td.repeatableyearly a.ui-state-default { background: #FFCC66 none; color : Bl } // This function shows the "Show Holiday" panel // - function showHoliday (exceptionPosibility, dayName, day, month, year, weekDay, title, description, holidayType) { + function showHoliday (exceptionPossibility, dayName, day, month, year, weekDay, title, description, holidayType) { $("#newHoliday").slideUp("fast"); $("#showHoliday").slideDown("fast"); $('#showDaynameOutput').html(dayName); @@ -415,10 +416,10 @@ td.repeatableyearly a.ui-state-default { background: #FFCC66 none; color : Bl $("#holtype").attr("class","key holiday").html(_("Unique holiday")); } - if (exceptionPosibility == 1) { - $("#exceptionPosibility").parent().show(); + if (exceptionPossibility == 1) { + $(".exceptionPossibility").parent().show(); } else { - $("#exceptionPosibility").parent().hide(); + $(".exceptionPossibility").parent().hide(); } } -- 2.39.5