52 lines
1.6 KiB
HTML
52 lines
1.6 KiB
HTML
<!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>
|