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: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
Jonathan Druart 2026-03-19 11:05:08 +01:00 committed by Pedro Amorim
parent 66c5eb6f29
commit 45f091cbce
No known key found for this signature in database
GPG Key ID: 06B75BA7F3894D55
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