base setup
This commit is contained in:
62
at_django_boilerplate/accounts/templates/reset/password_reset.html
Executable file
62
at_django_boilerplate/accounts/templates/reset/password_reset.html
Executable file
@@ -0,0 +1,62 @@
|
||||
{% extends "public_base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="flex items-center justify-center min-h-screen bg-gray-100 px-4">
|
||||
<div class="w-full max-w-md">
|
||||
<div class="bg-white shadow-xl rounded-2xl overflow-hidden">
|
||||
|
||||
<!-- Header -->
|
||||
<div class="px-6 py-4 border-b border-gray-200 text-center">
|
||||
<h3 class="text-xl font-semibold text-gray-800">Forgot Password?</h3>
|
||||
</div>
|
||||
|
||||
<!-- Error Messages -->
|
||||
{% if form.errors %}
|
||||
<div class="m-4 p-3 rounded-md bg-red-50 border border-red-200 text-red-700">
|
||||
<ul class="list-disc list-inside text-sm">
|
||||
{% for key, value in form.errors.items %}
|
||||
<li>{{ value }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<!-- Body -->
|
||||
<div class="px-6 py-4">
|
||||
<form method="POST" class="space-y-4">
|
||||
{% csrf_token %}
|
||||
|
||||
<!-- Email Field -->
|
||||
<div>
|
||||
<label for="id_email" class="block text-sm font-medium text-gray-700">Email</label>
|
||||
<input type="email"
|
||||
name="email"
|
||||
id="id_email"
|
||||
class="mt-1 block w-full rounded-lg border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm"
|
||||
placeholder="Enter email"
|
||||
autocomplete="email"
|
||||
maxlength="254"
|
||||
required>
|
||||
</div>
|
||||
|
||||
<!-- Submit Button -->
|
||||
<div>
|
||||
<button type="submit"
|
||||
class="w-full py-2 px-4 bg-gray-900 text-white font-medium rounded-lg shadow hover:bg-gray-800 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-900">
|
||||
Submit
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Footer -->
|
||||
<div class="px-6 py-4 border-t border-gray-200 text-center">
|
||||
<a href="{% url 'login' %}" class="text-sm text-indigo-600 hover:text-indigo-800">
|
||||
Back To Login
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
@@ -0,0 +1,9 @@
|
||||
<!-- templates/registration/password_reset_complete.html -->
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Password reset complete{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Password reset complete</h1>
|
||||
<p>Your new password has been set. You can log in now on the <a href="{% url 'login' %}">log in page</a>.</p>
|
||||
{% endblock %}
|
||||
42
at_django_boilerplate/accounts/templates/reset/password_reset_confirm.html
Executable file
42
at_django_boilerplate/accounts/templates/reset/password_reset_confirm.html
Executable file
@@ -0,0 +1,42 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Password Reset{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
|
||||
<style>
|
||||
.centered-form {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
background: rgba(255, 255, 255, 1.0); /* Adjust the opacity as needed */
|
||||
padding: 20px;
|
||||
border-radius: 10px;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
{% if validlink %}
|
||||
<div class="container-fluid h-100">
|
||||
<div class="row h-100">
|
||||
<div class="col-sm-8">
|
||||
<div class="centered-form">
|
||||
<h3>Set a New Password</h3>
|
||||
<form method="POST">
|
||||
{% csrf_token %}
|
||||
{{form|crispy}}
|
||||
|
||||
<button type="submit" class="btn btn-primary">Change My Password</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% else %}
|
||||
<p>The password reset link was invalid, possibly because it has already been used. Please request a new password reset.</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
26
at_django_boilerplate/accounts/templates/reset/password_reset_done.html
Executable file
26
at_django_boilerplate/accounts/templates/reset/password_reset_done.html
Executable file
@@ -0,0 +1,26 @@
|
||||
<!-- templates/registration/password_reset_done.html -->
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Email Sent{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div>
|
||||
{% if messages %}
|
||||
{% for message in messages %}
|
||||
<div class="alert mt-2
|
||||
{% if 'success' in message.tags %} alert-success
|
||||
{% elif 'warning' in message.tags %} alert-warning
|
||||
{% elif 'info' in message.tags %} alert-info
|
||||
{% else %} alert-danger
|
||||
{% endif %}">
|
||||
<span class="text-danger fst-italic">{{ message }}</span>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<h1>Check your inbox.</h1>
|
||||
<p>We've emailed you instructions for setting your password. You should receive the email shortly!</p>
|
||||
|
||||
{% endblock %}
|
||||
13
at_django_boilerplate/accounts/templates/reset/password_reset_email.html
Executable file
13
at_django_boilerplate/accounts/templates/reset/password_reset_email.html
Executable file
@@ -0,0 +1,13 @@
|
||||
{% autoescape off %}
|
||||
To initiate the password reset process for your we-kwick account,
|
||||
click the link below:
|
||||
|
||||
{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %}
|
||||
|
||||
If clicking the link above doesn't work, please copy and paste the URL below in a new browser
|
||||
window instead.
|
||||
|
||||
Sincerely,
|
||||
we-kwick Team
|
||||
{% endautoescape %}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<div style="background-color: #c2c2c2; padding: 15px;">
|
||||
<h2 style="margin: 0; padding: 10px; border-top-left-radius: 10px; border-top-right-radius: 10px; background-color: #fdc038; color: #ffffff;">
|
||||
Password Reset
|
||||
</h2>
|
||||
<div style="margin: 0; padding: 15px; background-color: #ffffff;">
|
||||
<p>Hi {{ user.name }},</p>
|
||||
<p>
|
||||
To initiate the password reset process for your we-kwick account,
|
||||
click the link below:
|
||||
|
||||
<a href="{{ request.scheme }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %}"
|
||||
style="border: 0; color: #ffffff; background-color: #fdc038; padding: 15px; font-weight: bold; text-decoration: none; border-radius: 5px; display: inline-block; margin-top: 20px;">
|
||||
Reset Password
|
||||
</a>
|
||||
|
||||
<p style="margin-top: 40px;">Or you can copy the link below to your browser</p>
|
||||
<p>{{ request.scheme }}://{{ domain }}{% url 'verify-email-confirm' uidb64=uid token=token %}</p>
|
||||
<p>The We-Kwick Team</p>
|
||||
</div>
|
||||
<div style="text-align: center; margin-top: 20px 0;">
|
||||
<p>© {% now 'Y' %} <a href="">Blog</a></p>
|
||||
<p>Follow us on <a href="">Twitter</a></p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1 @@
|
||||
We-Kwick Password Reset
|
||||
Reference in New Issue
Block a user