Problem/Motivation
The Webform module does not provide a consistent UX when deleting entities, plugins, and elements.
@see #2773205: Come up with a design for highly destructive operations in confirm forms
Proposed resolution
Provide a consistent UX for all confirm/delete actions
Remaining tasks
- Audit existing delete/confirm forms
- Move all delete/confirm forms to modal dialogs
- Create WebformConfirmFormBase
- Create WebformEntityDeleteForm
- Write basic test coverage
- Update existing forms
User interface changes
- Alway opening delete actions in a modal dialog
- Display an info/warning status describing what is being deleted
- For destructive behaviors provide a confirmation checkbox
- Clearly, state "What is being deleted?" (ie Configuration, content, translations, and relationships)
API changes
- New WebformConfirmFormBase
- New WebformEntityDeleteForm
Data model changes
N/A
Form
Entity Delete Forms
\Drupal\webform\WebformEntityDeleteForm
/admin/structure/webform/manage/contact/delete
\Drupal\webform\Form\WebformSubmissionDeleteForm
/admin/structure/webform/manage/WEBFORM_ID/submission/SID/delete
\Drupal\webform\WebformOptionsDeleteForm
/admin/structure/webform/config/options/WEBFORM_OPTION_ID/delete
\Drupal\webform_image_select\WebformImageSelectImagesDeleteForm
/admin/structure/webform/config/images/WEBFORM_IMAGES_ID/delete
\Drupal\webform_access\WebformAccessGroupDeleteForm
/admin/structure/webform/access/group/ACCESS_GROUP_ID/delete
\Drupal\webform_access\WebformAccessTypeDeleteForm
/admin/structure/webform/access/type/ACCESS_TYPE_ID/delete
Plugin/Element Delete Forms
\Drupal\webform_ui\Form\WebformUiElementDeleteForm
/admin/structure/webform/manage/WEBFORM_ID/element/ELEMENT_KEY/delete
\Drupal\webform\Form\WebformHandlerDeleteForm
/admin/structure/webform/manage/WEBFORM_ID/handlers/HANDLER_KEY/delete
\Drupal\webform\Form\WebformSubmissionDeleteMultiple
\Drupal\webform\Form\WebformSubmissionsDeleteFormBase
/admin/structure/webform/submissions/purge
/admin/structure/webform/manage/WEBFORM_ID/results/clear
Comment | File | Size | Author |
---|---|---|---|
#24 | 3008614-23.patch | 49.71 KB | jrockowitz |
| |||
#20 | 3008614-18.patch | 48.6 KB | jrockowitz |
| |||
#18 | 3008614-18.patch | 46.58 KB | jrockowitz |
#15 | 3008614-14.patch | 45.73 KB | jrockowitz |
#2 | webform-container-delete.png | 86.88 KB | jrockowitz |
Comments
Comment #2
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #15
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #18
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #20
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #22
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedHere is the change record.
Comment #24
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #26
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commented