diff --git a/src/registrar/admin.py b/src/registrar/admin.py index fd6ce45a7..2ffc29cda 100644 --- a/src/registrar/admin.py +++ b/src/registrar/admin.py @@ -1339,6 +1339,9 @@ class DomainAdmin(ListHeaderAdmin): # Table ordering ordering = ["name"] + # Override for the delete confirmation page on the domain table (bulk delete action) + delete_selected_confirmation_template = "django/admin/domain_delete_selected_confirmation.html" + def delete_view(self, request, object_id, extra_context=None): """ Custom delete_view to perform additional actions or customize the template. @@ -1346,7 +1349,6 @@ class DomainAdmin(ListHeaderAdmin): # Set the delete template to a custom one self.delete_confirmation_template = "django/admin/domain_delete_confirmation.html" - response = super().delete_view(request, object_id, extra_context=extra_context) return response diff --git a/src/registrar/assets/js/get-gov-admin.js b/src/registrar/assets/js/get-gov-admin.js index e632903bb..4ed1a0d28 100644 --- a/src/registrar/assets/js/get-gov-admin.js +++ b/src/registrar/assets/js/get-gov-admin.js @@ -86,8 +86,6 @@ function openInNewTab(el, removeAttribute = false){ linkClickedDisplaysModal.click() } }); - }else{ - console.error("displayModalOnDropdownClick() -> Some inputs are null") } } diff --git a/src/registrar/templates/django/admin/domain_delete_selected_confirmation.html b/src/registrar/templates/django/admin/domain_delete_selected_confirmation.html new file mode 100644 index 000000000..b8d9eb25c --- /dev/null +++ b/src/registrar/templates/django/admin/domain_delete_selected_confirmation.html @@ -0,0 +1,21 @@ +{% extends 'admin/delete_selected_confirmation.html' %} +{% load i18n static %} + +{% block content %} +{# TODO modify the "Are you sure?" to the text content below.. #} +{% comment %} +

Are you sure you want to remove this domain from the registry?

+{% endcomment %} +

Description

+

When a domain is removed from the registry:

+ + + +

This action cannot be undone.

+ +{{ block.super }} +{% endblock %} \ No newline at end of file