<!DOCTYPE html>
<html lang="ru" xmlns:th="http://www.thymeleaf.org"
th:replace="~{layout/auth :: html(pageTitle='Восстановление пароля', content=~{::content}, scripts=~{})}">
<body>
<th:block th:fragment="content">
<div class="auth-title">
<h2>Забыли пароль?</h2>
<p>Введите email для восстановления</p>
</div>
<form class="auth-form" method="post" th:action="@{/auth/forgot-password}" th:object="${request}">
<div class="mb-4">
<label for="email" class="form-label">Email</label>
<input type="email"
class="form-control"
th:classappend="${#fields.hasErrors('email')} ? 'is-invalid'"
id="email"
th:field="*{email}"
placeholder="your@email.com"
required
autofocus>
<div class="invalid-feedback" th:if="${#fields.hasErrors('email')}" th:errors="*{email}"></div>
</div>
<button type="submit" class="btn btn-auth">
Отправить ссылку
</button>
</form>
<div class="auth-links mt-4">
<a th:href="@{/auth/login}">← Вернуться к входу</a>
</div>
</th:block>
</body>
</html>