https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19814

--- Comment #90 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 203245
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203245&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.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to