Files
isdojp-lab/src/main/resources/templates/register_form.html
2024-11-14 13:35:46 +03:00

52 lines
1.6 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.
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Регистрация</title>
<link rel="stylesheet" th:href="@{/css/styles.css}">
</head>
<body>
<header>
<h1>Регистрация нового пользователя</h1>
</header>
<div class="container">
<form th:action="@{/register}" th:object="${user}" method="post">
<div>
<label for="name">Имя:</label>
<input type="text" id="name" th:field="*{name}" />
<br />
<span style="color: red" th:if="${#fields.hasErrors('name')}" th:errors="*{name}"></span>
</div>
<div>
<label for="email">Email:</label>
<input type="email" id="email" th:field="*{email}" />
<br />
<span style="color: red" th:if="${#fields.hasErrors('email')}" th:errors="*{email}"></span>
</div>
<div>
<label for="password">Пароль:</label>
<input type="password" id="password" th:field="*{password}" />
<br />
<span style="color: red" th:if="${#fields.hasErrors('password')}" th:errors="*{password}"></span>
</div>
<button type="submit">Зарегистрироваться</button>
</form>
<p th:if="${message}" th:text="${message}"></p>
<a href="/login">Уже зарегистрированы?</a>
</div>
<footer>
<p>© 2024 Магазин электротоваров. Все права защищены.</p>
</footer>
</body>
</html>