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>
This commit is contained in:
Owen Leonard 2026-04-22 08:31:41 -04:00 committed by Jacob O'Mara
parent 3ca9f8d2c4
commit f3482ddb93
No known key found for this signature in database
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

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