Bug 42133: Restore plugins when editing items in batch

It has been broken then fixed then broken again, several times...

This patch fixes 2 problems:
1. The CSRF fix (I think it's coming from there) didn't adjust the 'if show' test and the JS code from plugins was not injected into the template
2. The selector to call the plugin didn't include this view, only the
   add/edit items

Test plan:
Confirm that you can now use cataloging plugins when editing items in
batch

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2026-03-19 11:05:08 +01:00 committed by Lucas Gass
parent caa63ce8e6
commit 7c0880a9ec
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
2 changed files with 3 additions and 3 deletions

View File

@ -349,7 +349,7 @@
});
});
</script>
[% IF ( show ) %]
[% IF op == 'cud-action' %]
[%- # Loop over fields which may have plugin JavaScript -%]
[%- UNLESS (too_many_items_process) -%]
[%- FOREACH subfield IN subfields -%]

View File

@ -843,12 +843,12 @@ $(document).ready(function () {
// We use delegated event handlers here so that dynamically added elements
// (like when cloning a field or a subfield) respond to these events
// without having to re-attach events manually
$(".marc_editor").on(
$(".marc_editor, .item_edit_form").on(
"click",
".tag_editor.framework_plugin",
callClickPluginEventHandler
);
$(".marc_editor").on(
$(".marc_editor, .item_edit_form").on(
"focusin focusout change mousedown mouseup keydown keyup",
"input.input_marceditor.framework_plugin",
callPluginEventHandler