Base utilisateur

This commit is contained in:
jleroy
2024-04-22 14:20:47 +02:00
parent 2a7a4efd1c
commit 1f0855104d
9 changed files with 323 additions and 5 deletions

View File

@@ -0,0 +1,82 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Inscription</title>
</head>
<body>
<!-- Ajouter la page de nav bar -->
<div id="container-main">
<form th:action="@{/newUser}" method="post" th:object="${user}">
<div class="erreur-saisie" th:if="${#fields.hasErrors('*')}" >
<p th:text="#{index.erreurs}">Message d'erreur</p>
</div>
<div class="champ-saisie">
<label for="pseudo">Pseudo: </label>
<div>
<input type="text" th:field="*{pseudo}" id="pseudo" />
</div>
<span style="color: red;" th:if="${#fields.hasErrors('pseudo')}">
<ul>
<li th:each="erreur: ${#fields.errors('pseudo')}" th:text="${erreur}"></li>
</ul>
</span>
</div>
<div class="champ-saisie">
<label for="firstName">Prénom: </label>
<div>
<input type="text" th:field="*{firstName}" id="firstName" />
</div>
<span style="color: red;" th:if="${#fields.hasErrors('firstName')}">
<ul>
<li th:each="erreur: ${#fields.errors('firstName')}" th:text="${erreur}"></li>
</ul>
</span>
</div>
<div class="champ-saisie">
<label for="lastName">Nom: </label>
<div>
<input type="text" th:field="*{lastName}" id="lastName" />
</div>
<span style="color: red;" th:if="${#fields.hasErrors('lastName')}">
<ul>
<li th:each="erreur: ${#fields.errors('lastName')}" th:text="${erreur}"></li>
</ul>
</span>
</div>
<div class="champ-saisie">
<label for="email">Email: </label>
<div>
<input type="email" th:field="*{email}" id="email" />
</div>
<span style="color: red;" th:if="${#fields.hasErrors('email')}">
<ul>
<li th:each="erreur: ${#fields.errors('email')}" th:text="${erreur}"></li>
</ul>
</span>
</div>
<div class="champ-saisie">
<label for="phone">Téléphone: </label>
<div>
<input type="text" th:field="*{phone}" id="phone" />
</div>
<span style="color: red;" th:if="${#fields.hasErrors('phone')}">
<ul>
<li th:each="erreur: ${#fields.errors('phone')}" th:text="${erreur}"></li>
</ul>
</span>
</div>
<button>Créer</button>
<button>Annuler</button>
</form>
</div>
<!-- Ajouter le footer -->
</body>
</html>