Bug 42438: Remove event attributes from icon selection include file

This patch removes an "onmousedown" event attribute from the include
file used by item types and authorized values administration in icon
selection. The event handling is copied to each page's JS block.

To test, apply the patch and go to Administraion -> Item types.

In the "Choose an icon" section, click the "Remote image" tab. Click
the text input field. The corresponding radio button should be
checked.

Perform the same check on Administration -> Authorized values.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3160983a6d)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
This commit is contained in:
Owen Leonard 2026-04-22 08:31:41 -04:00 committed by Wainui Witika-Park
parent 32b2ce680a
commit 4954e000ee
No known key found for this signature in database
GPG Key ID: 2D0A6AB5DAF1B78D
3 changed files with 9 additions and 1 deletions

View File

@ -78,7 +78,7 @@
<img src="[% image_location | html %]" alt="" />
[% ELSE %]
<input type="radio" id="remote_image_check" name="image" value="remoteImage" />
<input type="text" name="remoteImage" size="48" maxlength="200" value="" onmousedown="document.getElementById('remote_image_check').checked = true;" />
<input type="text" id="remoteImage" name="remoteImage" size="48" maxlength="200" value="" />
[% END %]
[% END %]
[% END # /tab_panels %]

View File

@ -444,6 +444,10 @@
$("#library_limitation")[0].style.minWidth = "450px";
$("#library_limitation").select2();
}
$("#remoteImage").on("mousedown", function () {
$("#remote_image_check").prop("checked", true);
});
});
</script>
[% END %]

View File

@ -572,6 +572,10 @@
$("#library_limitation")[0].style.minWidth = "450px";
$("#library_limitation").select2();
}
$("#remoteImage").on("mousedown", function () {
$("#remote_image_check").prop("checked", true);
});
});
</script>
[% END %]