From 15bb49f28148fa66605c11ea064fd41d7f594094 Mon Sep 17 00:00:00 2001
From: Julian Maurice <julian.maurice@biblibre.com>
Date: Fri, 3 Feb 2023 11:58:54 +0100
Subject: [PATCH] Bug 32854: Fix
 cataloguing/value_builder/unimarc_field_126a.pl

Use event parameter

This is part of the refactoring happening in bug 30975

Test plan:
1. Verify that the plugin continues to work as before
---
 cataloguing/value_builder/unimarc_field_126a.pl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cataloguing/value_builder/unimarc_field_126a.pl b/cataloguing/value_builder/unimarc_field_126a.pl
index d1cfd84c4c..04abd1aa4d 100755
--- a/cataloguing/value_builder/unimarc_field_126a.pl
+++ b/cataloguing/value_builder/unimarc_field_126a.pl
@@ -33,9 +33,9 @@ my ($dbh,$record,$tagslib,$field_number) = @_;
 my $function_name= $field_number;
 my $res="
 <script>
-function Clic$function_name(i) {
-	defaultvalue=document.getElementById(\"$field_number\").value;
-	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_126a.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_126a\",'width=1000,height=575,toolbar=false,scrollbars=yes');
+function Clic$function_name(event) {
+	defaultvalue=document.getElementById(event.data.id).value;
+	newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_126a.pl&index=\" + event.data.id + \"&result=\"+defaultvalue,\"unimarc_field_126a\",'width=1000,height=575,toolbar=false,scrollbars=yes');
 
 }
 </script>
-- 
2.30.2