From d58d5064184cf948245988926da4c2276b1c3add 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 --- .../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 a1ae41be9c..7a6064a135 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 @@ -431,11 +431,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()); @@ -459,7 +459,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.34.1