смена пароля работает
This commit is contained in:
12
templates/account/change-password-done.html
Normal file
12
templates/account/change-password-done.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %} Пароль изменен {% endblock %}
|
||||
|
||||
{% block header-title %}
|
||||
<h1> Пароль аккаунта {{ target_user.login }} изменен! </h1>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<p><a href="{% url 'index' %}" class="value-good">Вернуться на главную</a></p>
|
||||
{% endblock %}
|
@@ -10,12 +10,32 @@
|
||||
<form method="POST">
|
||||
{% csrf_token %}
|
||||
|
||||
{% for field in form %}
|
||||
{% if old_password_required %}
|
||||
<div class="form-row">
|
||||
<label for="current_password">Текущий пароль</label>
|
||||
<input type="password" name="current_password" id="current_password" required
|
||||
{% if not old_password_wrong %}value="{{ request.POST.current_password }}"{% endif %}/>
|
||||
{% if old_password_wrong %}
|
||||
<p class="value-bad"> Проверьте правильность ввода пароля </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="form-row">
|
||||
{{ field.label_tag }} {{ field }}
|
||||
{{ field.errors }}
|
||||
<label for="password1">Новый пароль</label>
|
||||
<input type="password" name="password1" id="password1" required/>
|
||||
{% for err in new_password_errors %}
|
||||
<p class="value-bad">{{ err }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<label for="password2">Подтверждение нового пароля</label>
|
||||
<input type="password" name="password2" id="password2" required/>
|
||||
{% if not new_password_equals %}
|
||||
<p class="value-bad"> Пароли не совпадают </p>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<div class="form-row">
|
||||
<input id="submit" type="submit" value="Подтвердить">
|
||||
|
Reference in New Issue
Block a user