Problem/Motivation
As a webform administrator, I would like to bulk close, archive, and delete multiple webforms.
Proposed resolution
Add bulk operations to the webform and webform submission manage pages
Add the below webform bulk operations:
- Archive
- Delete
- Set category
- Set status (open/close)
Webform submissions already have bulk operations. We would need to copy some code from \Drupal\views\Plugin\views\field\BulkForm to create a dedicated webform submission bulk form.
Remaining tasks
- Build POC
- Determine if 'Delete operation' needs a confirmation page
- Determine who should have access to bulk operations.
- TBD
User interface changes
Bulk operations will be visible to administrators
API changes
- WebformEntityListBuilder and WebformSubmissionEntityListBuilder render array is going to need to be adjusted.
- Webform submission delete action needs some refactoring.
Data model changes
N/A
Comments
Comment #2
jrockowitz commentedAttached is a very simple POC. What is nice about this approach is the bulk operations are being cleanly layered on top of the existing functionality.
Comment #3
jrockowitz commentedComment #7
jrockowitz commentedThe attached patch adds bulk operation support for the webform manage UI.
This patch still needs some basic test coverage.
Comment #8
jrockowitz commentedComment #14
jrockowitz commentedComment #18
jrockowitz commentedComment #21
jrockowitz commentedComment #22
jrockowitz commentedComment #26
jrockowitz commentedComment #34
jrockowitz commentedComment #40
jrockowitz commentedComment #43
jrockowitz commentedComment #46
jrockowitz commentedComment #47
jrockowitz commentedThis patch is required to get bulk operations properly installed in 6.x
Comment #48
jrockowitz commented