Skip to content

Commit 380af8f

Browse files
committed
Domain: show warning in a modal when deleting domain
- Closes #429 - Closes readthedocs/readthedocs.org#11242
1 parent 14f9b95 commit 380af8f

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

readthedocsext/theme/templates/projects/partials/edit/domain_list.html

+9-5
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,15 @@
3838
data-content="{% trans "Edit" %}">
3939
<i class="fa-solid fa-wrench icon"></i>
4040
</a>
41-
<a class="ui icon button"
42-
href="{% url 'projects_domains_delete' project.slug object.pk %}"
43-
data-content="{% trans "Delete" %}">
44-
<i class="fa-duotone fa-trash icon"></i>
45-
</a>
41+
42+
{% url "projects_domains_delete" project_slug=project.slug domain_pk=object.pk as delete_url %}
43+
{% trans "Remove domain" as action_text %}
44+
{% blocktrans trimmed asvar content_text with domain=object.domain %}
45+
Remove domain {{ domain }}?
46+
Make sure to also remove the DNS records for this domain.
47+
Otherwise, another user may add the same domain to their project and serve that content from your domain (domain hijacking).
48+
{% endblocktrans %}
49+
{% include "includes/crud/remove_button.html" with id=object.pk form_url=delete_url action_text=action_text content_text=content_text %}
4650
{% endblock list_item_right_buttons %}
4751

4852
{% block list_item_image %}

0 commit comments

Comments
 (0)