mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-20 19:39:23 +02:00
Override for table view
This commit is contained in:
parent
73673abae1
commit
ac1886a2b5
3 changed files with 24 additions and 3 deletions
|
@ -1339,6 +1339,9 @@ class DomainAdmin(ListHeaderAdmin):
|
||||||
# Table ordering
|
# Table ordering
|
||||||
ordering = ["name"]
|
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):
|
def delete_view(self, request, object_id, extra_context=None):
|
||||||
"""
|
"""
|
||||||
Custom delete_view to perform additional actions or customize the template.
|
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
|
# Set the delete template to a custom one
|
||||||
self.delete_confirmation_template = "django/admin/domain_delete_confirmation.html"
|
self.delete_confirmation_template = "django/admin/domain_delete_confirmation.html"
|
||||||
|
|
||||||
response = super().delete_view(request, object_id, extra_context=extra_context)
|
response = super().delete_view(request, object_id, extra_context=extra_context)
|
||||||
|
|
||||||
return response
|
return response
|
||||||
|
|
|
@ -86,8 +86,6 @@ function openInNewTab(el, removeAttribute = false){
|
||||||
linkClickedDisplaysModal.click()
|
linkClickedDisplaysModal.click()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else{
|
|
||||||
console.error("displayModalOnDropdownClick() -> Some inputs are null")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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 %}
|
||||||
|
<h3>Are you sure you want to remove this domain from the registry?</h3>
|
||||||
|
{% endcomment %}
|
||||||
|
<h2>Description</h2>
|
||||||
|
<p>When a domain is removed from the registry:</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>The domain and its subdomains won’t resolve in DNS. Any infrastructure (like websites) will go offline.</li>
|
||||||
|
<li>The domain will still appear in the registrar / admin.</li>
|
||||||
|
<li>Domain managers won’t be able to edit the domain.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>This action cannot be undone.</p>
|
||||||
|
|
||||||
|
{{ block.super }}
|
||||||
|
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue