Bug 32826: Fix cataloguing/value_builder/unimarc_field_106.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

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Julian Maurice 2023-02-03 11:58:51 +01:00 committed by Tomas Cohen Arazi
parent 19c26fcc5a
commit 6c948b933e
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -32,9 +32,10 @@ my ($dbh,$record,$tagslib,$field_number) = @_;
my $function_name= "106".(int(rand(100000))+1);
my $res="
<script>
function Clic$field_number() {
defaultvalue=document.getElementById(\"$field_number\").value;
newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_106.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_106\",'width=500,height=400,toolbar=false,scrollbars=yes');
function Clic$field_number(ev) {
ev.preventDefault();
defaultvalue=document.getElementById(ev.data.id).value;
newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_106.pl&index=\" + ev.data.id + \"&result=\"+defaultvalue,\"unimarc_field_106\",'width=500,height=400,toolbar=false,scrollbars=yes');
}
</script>