https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19814 --- Comment #134 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 204031 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204031&action=edit Bug 19814: (follow-up) Namespace batch modal click handlers The initial wire-up for the batch confirm modal used plain .on('click', ...) on three buttons. In the current flow the modal is only ever server-rendered once per page load, so this is safe today, but binding without a matching .off() means that if the modal markup ever gets re-rendered mid-session (for example via a future AJAX flow) the handlers would stack, producing duplicate hidden inputs and double form submissions. Use a .batchConfirm event namespace and .off()/.on() so the wire-up is idempotent regardless of how often it runs. Test plan: 1. Scan a batch list containing an item that triggers the confirm modal; click "Confirm all parts present" / "Skip this item" / "Cancel batch" in turn and confirm each still behaves as before. 2. Inspect the form on submit and confirm only a single multiple_confirm (or confirm_items_bundle_return / batch_skip_confirm) hidden input is appended. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.