Bug 32823: Fix cataloguing/value_builder/unimarc_field_100_authorities.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 4fe0e47da2
commit 19c26fcc5a
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 3 additions and 1 deletions

View File

@ -30,7 +30,9 @@ sub plugin_javascript {
my ( $dbh, $record, $tagslib, $field_number ) = @_;
my $res = "
<script>
function Clic$field_number(i) {
function Clic$field_number(event) {
event.preventDefault();
const i = event.data.id;
var defaultvalue;
try {
defaultvalue = document.getElementById(i).value;