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 <andrewfh@dubcolib.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 80eb5ac35b)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit a2a8cb86b0)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This commit is contained in:
Nick Clemens 2023-06-07 13:20:40 +00:00 committed by Matt Blenkinsop
parent 08741b6426
commit 2ee83ca00a

View file

@ -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();