Rename password-reset templates
This commit is contained in:
parent
274959475e
commit
86c6149327
11 changed files with 32 additions and 41 deletions
|
|
@ -74,27 +74,27 @@ class ActivationResendView(registration_views.ResendActivationView):
|
|||
# prompts for a new password
|
||||
# PasswordResetCompleteView shows a success message for the above
|
||||
class PasswordResetView(django_views.PasswordResetView):
|
||||
template_name = "password-reset/password_reset_form.html"
|
||||
subject_template_name = "password-reset/password_reset_subject.txt"
|
||||
email_template_name = "password-reset/password_reset_email.html"
|
||||
template_name = "password-reset/password-reset.html"
|
||||
subject_template_name = "password-reset/password-reset-subject.txt"
|
||||
email_template_name = "password-reset/password-reset-email.html"
|
||||
success_url = reverse_lazy("accounts:password-reset-done")
|
||||
|
||||
|
||||
class PasswordResetDoneView(django_views.PasswordResetDoneView):
|
||||
template_name = "password-reset/password_reset_done.html"
|
||||
template_name = "password-reset/password-reset-done.html"
|
||||
|
||||
|
||||
class PasswordResetConfirmView(django_views.PasswordResetConfirmView):
|
||||
template_name = "password-reset/password_reset_confirm.html"
|
||||
template_name = "password-reset/password-reset-confirm.html"
|
||||
success_url = reverse_lazy("accounts:password-reset-complete")
|
||||
|
||||
|
||||
class PasswordResetCompleteView(django_views.PasswordResetCompleteView):
|
||||
template_name = "password-reset/password_reset_complete.html"
|
||||
template_name = "password-reset/password-reset-complete.html"
|
||||
|
||||
|
||||
class PasswordChangeView(django_views.PasswordChangeView):
|
||||
template_name = "accounts/views/password_change.html"
|
||||
template_name = "accounts/views/password-change.html"
|
||||
success_url = reverse_lazy("accounts:settings")
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,14 +3,17 @@
|
|||
<form class="form{% if classes %} {{ classes }}{% endif %}" method="{{ method|default:"post" }}" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
|
||||
{% if form.non_field_errors %}
|
||||
{% include "form/errors.html" with errors=form.non_field_errors only %}
|
||||
{% endif %}
|
||||
|
||||
{% if title %}
|
||||
{% include "form/title.html" with title=title only %}
|
||||
{% endif %}
|
||||
|
||||
{% block intro %}
|
||||
{% endblock intro %}
|
||||
|
||||
{% if form.non_field_errors %}
|
||||
{% include "form/errors.html" with errors=form.non_field_errors only %}
|
||||
{% endif %}
|
||||
|
||||
{% block fields %}
|
||||
<section class="section form__section">
|
||||
{% for field in form.hidden_fields %}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
{% extends "form/form.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block intro %}
|
||||
<p>
|
||||
{% blocktrans %}
|
||||
Forgot your password? Enter your email in the form below and we'll send you
|
||||
instructions for creating a new one.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
{% endblock intro %}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<main class="main">
|
||||
{% include "password-reset/password-reset-form.html" with form=form title="Reset password" confirm_text="Reset password" %}
|
||||
</main>
|
||||
{% endblock %}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
{% extends "base.html" %}
|
||||
{% load static i18n %}
|
||||
|
||||
{% block title %}{% trans "Reset password" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<main class="main">
|
||||
<form class="form password-reset-form" method="POST">
|
||||
{% csrf_token %}
|
||||
<div class="form__header">
|
||||
<h1 class="form__title">{% trans "Reset password" %}</h1>
|
||||
|
||||
<p>
|
||||
{% blocktrans %}
|
||||
Forgot your password? Enter your email in the form below and we'll send you
|
||||
instructions for creating a new one.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<fieldset class="fieldset password-reset-form__fieldset">
|
||||
{{ form }}
|
||||
</fieldset>
|
||||
<fieldset class="fieldset password-reset-form__fieldset">
|
||||
<a class="button button--cancel" href="{% url 'accounts:login' %}">Cancel</a>
|
||||
<button class="button button--confirm" type="submit">Send reset mail</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
</main>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue