diff --git a/app/dashboard/templates/dashboard/domain_detail/dns.html b/app/dashboard/templates/dashboard/domain_detail/dns.html
index dfb18a77..a2341b17 100644
--- a/app/dashboard/templates/dashboard/domain_detail/dns.html
+++ b/app/dashboard/templates/dashboard/domain_detail/dns.html
@@ -21,9 +21,9 @@
1. MX record
{% if custom_domain.verified %}
- ✅
+ ✅
{% else %}
- 🚫
+ 🚫
{% endif %}
@@ -70,9 +70,9 @@
2. SPF (Optional)
{% if custom_domain.spf_verified %}
- ✅
+ ✅
{% else %}
- 🚫
+ 🚫
{% endif %}
@@ -126,9 +126,9 @@
3. DKIM (Optional)
{% if custom_domain.dkim_verified %}
- ✅
+ ✅
{% else %}
- 🚫
+ 🚫
{% endif %}
@@ -184,33 +184,5 @@
{% endif %}
-
-
Delete Domain
-
Please note that this operation is irreversible.
- All aliases associated with this domain will be also deleted
-
-
-
-
{% endblock %}
-
-{% block script %}
-
-{% endblock %}
\ No newline at end of file
diff --git a/app/dashboard/templates/dashboard/domain_detail/info.html b/app/dashboard/templates/dashboard/domain_detail/info.html
index 399cdb2c..4315d790 100644
--- a/app/dashboard/templates/dashboard/domain_detail/info.html
+++ b/app/dashboard/templates/dashboard/domain_detail/info.html
@@ -47,12 +47,36 @@
+
+ Delete Domain
+ Please note that this operation is irreversible.
+ All aliases associated with this domain will be also deleted
+
+
+
+
{% endblock %}
{% block script %}
{% endblock %}
\ No newline at end of file
diff --git a/app/dashboard/views/domain_detail.py b/app/dashboard/views/domain_detail.py
index 43b0dda8..e0788e6b 100644
--- a/app/dashboard/views/domain_detail.py
+++ b/app/dashboard/views/domain_detail.py
@@ -87,13 +87,7 @@ def domain_detail_dns(custom_domain_id):
dkim_ok = False
dkim_errors = get_txt_record(f"dkim._domainkey.{custom_domain.domain}")
- elif request.form.get("form-name") == "delete":
- name = custom_domain.domain
- CustomDomain.delete(custom_domain_id)
- db.session.commit()
- flash(f"Domain {name} has been deleted", "success")
- return redirect(url_for("dashboard.custom_domain"))
spf_include_records = []
for priority, email_server in EMAIL_SERVERS_WITH_PRIORITY:
@@ -137,6 +131,13 @@ def domain_detail(custom_domain_id):
return redirect(
url_for("dashboard.domain_detail", custom_domain_id=custom_domain.id)
)
+ elif request.form.get("form-name") == "delete":
+ name = custom_domain.domain
+ CustomDomain.delete(custom_domain_id)
+ db.session.commit()
+ flash(f"Domain {name} has been deleted", "success")
+
+ return redirect(url_for("dashboard.custom_domain"))
nb_alias = GenEmail.filter_by(custom_domain_id=custom_domain.id).count()