Opened 2 years ago

Closed 2 years ago

#33930 closed Cleanup/optimization (fixed)

Add id="deleted-objects" to template admin/delete_confirmation.html

Reported by: Jacob Rief Owned by: Jacob Rief
Component: contrib.admin Version: dev
Severity: Normal Keywords: admin/delete_confirmation.html
Cc: אורי Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: yes

Description

As discussed on the developers mailing list, see https://groups.google.com/g/django-developers/c/VTRqW7ZmB6A ,
is would make sense to add id="deleted-objects" to the <ul> element showing the objects to be deleted.

Reason:
Whenever a user attempts to delete an object inside the Django admin,
a delete confirmation page is shown. If the object to be deleted contains
many relations, the user is overwhelmed with a list of other objects to be
deleted together with the current object. Often those objects are just
internal relations the user never heard of, and this may be unsettling.

By overriding that template one can use CSS to hide this list and add a short
JavaScript snippet to unhide if necessary.

Change History (6)

comment:1 by Mariusz Felisiak, 2 years ago

Triage Stage: UnreviewedAccepted
Type: New featureCleanup/optimization

comment:2 by אורי, 2 years ago

Cc: אורי added

comment:4 by Mariusz Felisiak, 2 years ago

Has patch: set
Patch needs improvement: set

comment:5 by Mariusz Felisiak, 2 years ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 2 years ago

Resolution: fixed
Status: assignedclosed

In aed60ae:

Fixed #33930 -- Eased customization of delete_confirmation.html template in the admin.

Note: See TracTickets for help on using tickets.
Back to Top