Frontend Modules


Frontend Modules / bulk-actions

bulk-actions

Handles bulk actions on list views — selecting items, enabling the execute button, and submitting the action form.

Attached to the root element via data-js-bulk-actions. Expects the following elements within root:

  • #bulk-action-form — the form to submit (omit if root itself is the form)

  • #bulk-select-all — checkbox to select/deselect all items

  • .bulk-select-item — per-row checkboxes (may be added dynamically via AJAX)

  • #bulk-action — select element listing available bulk actions

  • #bulk-action-execute — submit button, enabled only when items and an action are selected

  • [data-list-selection-count] — element displaying the number of selected items

Each <option> in #bulk-action may carry:

  • data-bulk-action — URL to set as the form action on submit

  • data-target — optional form target (e.g. _blank for PDF export in a new tab)

  • .bulk-confirmation-dialog + data-popup-title, data-popup-subject, data-popup-text — show a confirmation dialog before submitting

Uses event delegation on the root for .bulk-select-item changes so dynamically inserted rows (e.g. from async page tree loading) are handled without re-initialisation.