From 7a72afed19fdb39d3df88f73982df45bbadcb095 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Mon, 11 Apr 2022 19:35:14 +0000 Subject: [PATCH] Bug 30346: Correctly transfer values when editing rules To test: --Create a circulation rule with a value in "Overdue fines cap (amount), or edit an existing rule to add it -Save the new (or edited) rule. -Edit the same rule again to change any other field. Note that "Overdue fines cap (amount)" is now blank -Save your edited rule - "Overdue fines cap (amount)" will save as blank. Apply patch --Create a circ rule with a value in Overdue fines cap (amount) and check "Cap fine at replacement price" for that same rule. -Save the rule -Try ediding the rule and make sure both of those values now save correctly. -Add several more rules and try playing with both "Cap fine at replacement price" and "Overdue fines cap (amount)". Make sure everything saves right. --- koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt index 0ee352fcb0..146a6dbb61 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt @@ -1287,7 +1287,7 @@ } $(current_column).find("input[type='text']").val(input_value); $(current_column).find("select").val(select_value); - } else if ( i == 15 ) { + } else if ( i == 16 ) { // specific processing for cap_fine_to_replacement_price var cap_fine_to_replacement_price = $(this).find("input[type='checkbox']"); $('#cap_fine_to_replacement_price').prop('checked', cap_fine_to_replacement_price.is(':checked') ); -- 2.30.2