From 4c83ac6e5c323b105c613922893ed9000c5c203c Mon Sep 17 00:00:00 2001 From: Shi Yao Wang Date: Fri, 2 Dec 2022 16:06:35 -0500 Subject: [PATCH] Bug 31694: (follow-up) Fix preset display issue Preset column should now display the right preset. Signed-off-by: David Nind Signed-off-by: Jan Kissig Signed-off-by: Julian Maurice Signed-off-by: Katrin Fischer (cherry picked from commit 35ddacf397c6d2b7bd58b7adf9606fdeb24ef681) Signed-off-by: Fridolin Somers (cherry picked from commit d6511233b89ff267ab06606decf010fa9fdd1244) Signed-off-by: Lucas Gass --- .../prog/en/modules/admin/marc-overlay-rules.tt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt index bd02fc4cf1..a2d3a4fc07 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt @@ -426,11 +426,11 @@ }; var overlay_rules_label_to_value = {}; - overlay_rules_label_to_value["add"] = 1; - overlay_rules_label_to_value["append"] = 1; - overlay_rules_label_to_value["remove"] = 1; - overlay_rules_label_to_value["delete"] = 1; - overlay_rules_label_to_value["skip"] = 0; + overlay_rules_label_to_value[_("Add")] = 1; + overlay_rules_label_to_value[_("Append")] = 1; + overlay_rules_label_to_value[_("Remove")] = 1; + overlay_rules_label_to_value[_("Delete")] = 1; + overlay_rules_label_to_value[_("Skip")] = 0; function hash_config(config) { return JSON.stringify(config, Object.keys(config).sort()); @@ -454,7 +454,7 @@ operations_config[$operation.data('operation')] = overlay_rules_label_to_value[$operation.text()]; }); $('.rule-preset', $this).text( - operations_config_overlay_rule_preset(operations_config) || _("Custom") + $('option[value="' + operations_config_overlay_rule_preset(operations_config) + '"]').text() || _("Custom") ); }); -- 2.39.5