From f69e3b364f13cb6dbcf9aa12d3d21fea8c1f3798 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. Signed-off-by: Andrew Fuerste-Henry Signed-off-by: Martin Renvoize Signed-off-by: Fridolin Somers Signed-off-by: Kyle M Hall --- 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 2d24283cbc..15a4d36d5d 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 @@ -1179,7 +1179,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.39.5