From 99af855c189ca4fd91bdb73168554f2f8536b646 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 7 Jun 2023 13:20:40 +0000 Subject: [PATCH] Bug 33939: Preserve order budget dropdowns and default budget dropdowns seperately The dropdowns have different hints after bug 22802. We need to preserve those when adding or hiding inactive budgets To test: 1 - Add some inactive budgets to Koha 2 - Use the settings and file from bug 22802 to stage a file and begin adding to basket 3 - When adding to basket test the 'Show inactive funds' on both the 'Select to import' tab and the 'Default accounting details' tab 4 - Ensure the dropdown hints/defaults don't change when hiding/showing budgets 5 - Confirm inactive budgets are correctly shown/hidden Signed-off-by: Andrew Fuerste-Henry --- koha-tmpl/intranet-tmpl/prog/js/funds_sorts.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/js/funds_sorts.js b/koha-tmpl/intranet-tmpl/prog/js/funds_sorts.js index 6659e3e7be..3c520bac48 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/funds_sorts.js +++ b/koha-tmpl/intranet-tmpl/prog/js/funds_sorts.js @@ -1,7 +1,8 @@ /* getAuthValueDropbox from js/acq.js is needed */ $(document).ready(function() { // keep copy of the inactive budgets - disabledBudgetsCopy = $("select[name='all_budget_id']").html(); + disabledAllBudgetsCopy = $("select[name='all_budget_id']").html(); + disabledBudgetsCopy = $("select[name='budget_id']").first().html(); $("select[name='all_budget_id'] .b_inactive").remove(); $("select[name='budget_id'] .b_inactive").remove(); @@ -16,7 +17,7 @@ $(document).ready(function() { $("#all_showallbudgets").click(function() { if ($(this).is(":checked")) { - $("select[name='all_budget_id']").html(disabledBudgetsCopy); + $("select[name='all_budget_id']").html(disabledAllBudgetsCopy); } else { $("select[name='all_budget_id'] .b_inactive").remove(); -- 2.30.2