|
1 | 1 | {% extends "account/base.html" %} |
2 | 2 |
|
3 | | -{% load i18n %} |
4 | | -{% load account %} |
| 3 | +{% load widget_tweaks %} |
5 | 4 |
|
6 | | -{% block head_title %}{% trans "Reset password" %}{% endblock %} |
| 5 | +{% block head_title %}Reset password{% endblock %} |
7 | 6 |
|
8 | | -{% block content_header %}{% trans "Reset password" %}{% endblock %} |
| 7 | +{% block header %}{% endblock %} |
9 | 8 |
|
10 | 9 | {% block content %} |
11 | 10 | {% if user.is_authenticated %} |
12 | 11 | {% include "account/snippets/already_logged_in.html" %} |
13 | 12 | {% endif %} |
14 | | - <p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it." %}</p> |
15 | | - |
16 | | - <form method="POST" action="{% url 'account_reset_password' %}" class="password_reset">{% csrf_token %} |
17 | | - {{ form.as_p }} |
18 | | - <button type="submit">{% trans "Reset password" %}</button> |
19 | | - </form> |
20 | | - <p>{% blocktrans %}Please contact us if you have any trouble resetting your password.{% endblocktrans %}</p> |
21 | | -{% endblock %} |
22 | | - |
23 | | -{% block extra_scripts %} |
24 | | -<script> |
25 | | - $("#id_email").focus(); |
26 | | -</script> |
| 13 | + <div class="w-[40rem] flex flex-col items-center justify-center mx-auto p-8 font-common shadow-sign-content rounded-lg"> |
| 14 | + {% include "socialaccount/snippets/login_extra.html" %} |
| 15 | + <h3>Forgotten your password?</h3> |
| 16 | + <p class="text-center font-xl my-4">Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it.</p> |
| 17 | + <form class="flex flex-col items-center w-[80%]" method="POST" action="{% url 'account_reset_password' %}"> |
| 18 | + {% csrf_token %} |
| 19 | + {% if form.non_field_errors %} |
| 20 | + <ul class="m-0 border-2 rounded-md p-2 border-red-400 text-red-600 font-bold"> |
| 21 | + {% for error in form.non_field_errors %}<li>{{ error }}</li>{% endfor %} |
| 22 | + </ul> |
| 23 | + {% endif %} |
| 24 | + {% for field in form %} |
| 25 | + <div class="w-full my-1"> |
| 26 | + <div class="flex w-full my-2"> |
| 27 | + <label class="text-base text-left">{{ field.label }}</label> |
| 28 | + <span aria-hidden="true" class="text-4xl text-red-400 h-2 ml-1">*</span> |
| 29 | + </div> |
| 30 | + {% if field.errors %} |
| 31 | + {{ field|add_class:"h-12 text-lg rounded-lg border-red-600 border-2 my-2" }} |
| 32 | + {% else %} |
| 33 | + {{ field|add_class:"h-12 text-lg rounded-lg border-base-green-400 border-2 my-2" }} |
| 34 | + {% endif %} |
| 35 | + {% if field.help_text %}<div class="w-full text-left ml-4 font-text">{{ field.help_text|safe }}</div>{% endif %} |
| 36 | + {% if field.errors %}<ul class="m-0 w-full ml-4 text-left text-red-600 font-text">{% for error in field.errors %}<li>{{ error }}</li>{% endfor %}</ul>{% endif %} |
| 37 | + </div> |
| 38 | + {% endfor %} |
| 39 | + <button type="submit" class="w-full my-4 h-12 text-lg bg-base-green-600 border-2 rounded-lg border-base-green-800 font-common hover:bg-base-white-400 hover:text-base-green-600">Reset My Password</button> |
| 40 | + </form> |
| 41 | + </div> |
27 | 42 | {% endblock %} |
| 43 | +{% block footer %}{% endblock %} |
0 commit comments