-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the applicationIntroduction of new functionality to the application
Description
NetBox version
v3.1.4
Feature type
Change to existing functionality
Proposed functionality
Currently, when deleting an object, two requests are made:
- The user clicks delete and is taken to the deletion confirmation form.
- The user submits the confirmation form, the object is deleted, and the user is redirected to the return URL.
It should be trivial to instead use a modal dialog to display the confirmation form. The proposed workflow would be:
- The user clicks delete and an HTMX request is made to retrieve the confirmation form (and any relevant information, such as related objects). The form is rendered in a modal and displayed, but the user remains on the original page.
- The user submits the confirmation form, the object is deleted, and the user is redirected to the return URL.
Although we're still technically making two requests, the first loads only the confirmation form and avoids a complete page request.
We should be able to implement this entirely within the relevant generic view classes.
Use case
Loading the confirmation dialog via HTMX avoids a full page refresh and greatly reduces the time needed to delete an object (and especially to abort the deletion of an object).
Database changes
No response
External dependencies
No response
bluikko, DanSheps and benwa
Metadata
Metadata
Assignees
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the applicationIntroduction of new functionality to the application