Bug 32830: Fix cataloguing/value_builder/unimarc_field_116.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: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

https://bugs.koha-community.org/show_bug.cgi?id=32831
This commit is contained in:
Julian Maurice 2023-02-03 11:58:52 +01:00 committed by Tomas Cohen Arazi
parent b88d364018
commit 4d196b176d
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -32,9 +32,10 @@ sub plugin_javascript {
my ( $dbh, $record, $tagslib, $field_number ) = @_;
my $res = "
<script>
function Clic$field_number(i) {
defaultvalue=document.getElementById(\"$field_number\").value;
window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_116.pl&index=$field_number&result=\"+defaultvalue,\"unimarc_field_116\",'width=1200,height=600,toolbar=false,scrollbars=yes');
function Clic$field_number(event) {
event.preventDefault();
defaultvalue=document.getElementById(event.data.id).value;
window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=unimarc_field_116.pl&index=\" + event.data.id + \"&result=\"+defaultvalue,\"unimarc_field_116\",'width=1200,height=600,toolbar=false,scrollbars=yes');
}
</script>