its not redirecting to login page after storing the detail
Browse files- signup.html +9 -4
signup.html
CHANGED
|
@@ -32,18 +32,23 @@
|
|
| 32 |
<span class="font-semibold text-xl">CyberGuardian</span>
|
| 33 |
</div>
|
| 34 |
<h1 class="text-2xl font-bold text-gray-800 mb-6">Create your account</h1>
|
| 35 |
-
|
| 36 |
{% with messages = get_flashed_messages(with_categories=true) %}
|
| 37 |
{% if messages %}
|
| 38 |
{% for category, message in messages %}
|
| 39 |
-
<div class="mb-4 p-4 rounded-md bg-
|
| 40 |
{{ message }}
|
| 41 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
{% endfor %}
|
| 43 |
{% endif %}
|
| 44 |
{% endwith %}
|
| 45 |
-
|
| 46 |
-
<form action="/signup" method="POST">
|
| 47 |
<div class="mb-4">
|
| 48 |
<label for="username" class="block text-gray-700 text-sm font-medium mb-2">Username</label>
|
| 49 |
<input type="text" id="username" name="username" required
|
|
|
|
| 32 |
<span class="font-semibold text-xl">CyberGuardian</span>
|
| 33 |
</div>
|
| 34 |
<h1 class="text-2xl font-bold text-gray-800 mb-6">Create your account</h1>
|
|
|
|
| 35 |
{% with messages = get_flashed_messages(with_categories=true) %}
|
| 36 |
{% if messages %}
|
| 37 |
{% for category, message in messages %}
|
| 38 |
+
<div class="mb-4 p-4 rounded-md {% if category == 'success' %}bg-green-100 border-green-200 text-green-700{% else %}bg-red-100 border-red-200 text-red-700{% endif %}">
|
| 39 |
{{ message }}
|
| 40 |
</div>
|
| 41 |
+
{% if category == 'success' %}
|
| 42 |
+
<script>
|
| 43 |
+
setTimeout(function() {
|
| 44 |
+
window.location.href = "/login";
|
| 45 |
+
}, 1500);
|
| 46 |
+
</script>
|
| 47 |
+
{% endif %}
|
| 48 |
{% endfor %}
|
| 49 |
{% endif %}
|
| 50 |
{% endwith %}
|
| 51 |
+
<form action="/signup" method="POST">
|
|
|
|
| 52 |
<div class="mb-4">
|
| 53 |
<label for="username" class="block text-gray-700 text-sm font-medium mb-2">Username</label>
|
| 54 |
<input type="text" id="username" name="username" required
|