Files
octopus/myproject/accounts/templates/accounts/password_reset_confirm.html

48 lines
1.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends 'base.html' %}
{% block title %}Сброс пароля{% endblock %}
{% block content %}
<div class="container">
<div class="form-container">
<h2 class="text-center mb-4">Сброс пароля</h2>
<div class="tab-content">
<div class="tab-pane fade show active" id="reset-password">
<form method="post">
{% csrf_token %}
{% include 'accounts/password_input.html' with field_name='password1' field_label='Новый пароль' required=True %}
{% include 'accounts/password_input.html' with field_name='password2' field_label='Подтверждение пароля' required=True %}
<button type="submit" class="btn btn-primary w-100">Сбросить пароль</button>
</form>
<!-- Ссылка на вход -->
<div class="text-center mt-3">
<a href="{% url 'accounts:login' %}" class="text-decoration-none">Вспомнили пароль? Войти</a>
</div>
</div>
</div>
</div>
</div>
<script>
// Добавляем обработчик для показа/скрытия пароля
document.querySelectorAll('.show-password-btn').forEach(button => {
button.addEventListener('click', function() {
const targetId = this.getAttribute('data-target');
const targetInput = document.getElementById(targetId);
const icon = this.querySelector('i');
if (targetInput.type === 'password') {
targetInput.type = 'text';
icon.classList.remove('bi-eye');
icon.classList.add('bi-eye-slash');
} else {
targetInput.type = 'password';
icon.classList.remove('bi-eye-slash');
icon.classList.add('bi-eye');
}
});
});
</script>
{% endblock %}