Browse Source

Use a better mailbox validation page

Son NK 5 years ago
parent
commit
28c6c68a80

+ 19 - 0
app/dashboard/templates/dashboard/mailbox_validation.html

@@ -0,0 +1,19 @@
+{% extends "base.html" %}
+
+
+{% block title %}
+  Mailbox Validation
+{% endblock %}
+
+
+{% block content %}
+  <div class="mx-auto p-7 card" style="max-width: 50rem">
+    <div class="text-center mb-7">Mailbox <b>{{ mailbox.email }}</b> verified, you can now start creating alias with it
+    </div>
+
+    <div class="mx-auto">
+      <a href="{{ url_for('dashboard.index') }}" class="btn btn-primary">Go To Home Page</a>
+    </div>
+  </div>
+
+{% endblock %}

+ 2 - 7
app/dashboard/views/mailbox.py

@@ -151,10 +151,5 @@ def mailbox_verify():
         db.session.commit()
 
         LOG.d("Mailbox %s is verified", mailbox)
-        flash(
-            f"The {mailbox.email} is now verified, you can start creating alias with it",
-            "success",
-        )
-        return redirect(
-            url_for("dashboard.mailbox_detail_route", mailbox_id=mailbox.id)
-        )
+
+        return render_template("dashboard/mailbox_validation.html", mailbox=mailbox)