From a789184e01d269a1d12f88315aff2959fe16658a Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 27 Apr 2016 15:39:55 +0000 Subject: [PATCH] Bug 11565 [QA Followup] - Only hide options when none are in use Signed-off-by: Katrin Fischer Signed-off-by: Kyle M Hall --- koha-tmpl/intranet-tmpl/prog/en/js/pages/circulation.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/pages/circulation.js b/koha-tmpl/intranet-tmpl/prog/en/js/pages/circulation.js index 92dba4b524..3a35fba171 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/pages/circulation.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/pages/circulation.js @@ -49,6 +49,15 @@ $(document).ready(function() { var checkout_settings = $(".checkout-settings"); var checkout_settings_icon = $(".checkout-settings-icon"); + // If any checkboxes in the checkout settings are selected, show the settings by default + if ( $(".checkout-settings input:checked,#duedatespec[value!='']").length ) { + checkout_settings.show(); + checkout_settings_icon.removeClass("fa-caret-right").addClass("fa-caret-down"); + } else { + checkout_settings.hide(); + checkout_settings_icon.removeClass("fa-caret-down").addClass("fa-caret-right"); + } + $("#show-checkout-settings a").on("click",function(){ if( checkout_settings.is(":hidden")){ checkout_settings.show(); -- 2.39.5