Bug 32869: Fix cataloguing/value_builder/unimarc_field_210c.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: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Julian Maurice 2023-02-03 11:58:54 +01:00 committed by Tomas Cohen Arazi
parent 9030a637e2
commit d0d4ce0e6b
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 4 additions and 3 deletions

View File

@ -43,9 +43,10 @@ my $function_name= $field_number;
my $res = "
<script>
function Clic$function_name(subfield_managed) {
defaultvalue=escape(document.getElementById(\"$field_number\").value);
newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_210c.pl&index=\"+subfield_managed,\"unimarc_225a\",'width=500,height=600,toolbar=false,scrollbars=yes');
function Clic$function_name(event) {
event.preventDefault();
defaultvalue=escape(document.getElementById(event.data.id).value);
newin=window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_210c.pl&index=\" + event.data.id, \"unimarc_225a\",'width=500,height=600,toolbar=false,scrollbars=yes');
}
</script>
";