Refactor password confirm form
This commit is contained in:
parent
3ea359ff8a
commit
abd757f571
1 changed files with 7 additions and 24 deletions
|
|
@ -7,29 +7,13 @@
|
||||||
<meta name="referrer" content="origin">
|
<meta name="referrer" content="origin">
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block title %}{% trans "Confirm password reset" %}{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<main class="main">
|
<main class="main">
|
||||||
|
|
||||||
{% if validlink %}
|
{% if validlink %}
|
||||||
<form class="form password-reset-confirm-form" method="POST">
|
{% url 'accounts:login' as cancel_url %}
|
||||||
{% csrf_token %}
|
{% trans "Enter your new password below to reset your password:" as title %}
|
||||||
<div class="form__header">
|
{% trans "Change password" as confirm_text %}
|
||||||
<h1 class="form__title">
|
{% include "components/form/form.html" with form=form title=title confirm_text=confirm_text cancel_url=cancel_url %}
|
||||||
{% trans "Enter your new password below to reset your password:" %}
|
|
||||||
</h1>
|
|
||||||
</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">Change password</button>
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card__header">
|
<div class="card__header">
|
||||||
|
|
@ -51,5 +35,4 @@
|
||||||
</main>
|
</main>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
{# This is used by django.contrib.auth #}
|
{# This is used by django.contrib.auth #}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue