registration.html 1.31 KB
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>Ajout d'utilisateurs</title>
    <meta charset="utf-8"/>
</head>
<body>
<div>
    <h5>Ajout d'utilisateurs :</h5>
    <form th:action="@{/registration}" method="POST">
        <div class="form1">
            <label for="username">User Name: </label>
            <input type="text" id="username" placeholder="Enter UserName" name="pseudo"/>
        </div>
        <div class="form2">
            <label for="password">Password: </label>
            <input type="password" id="password" placeholder="Enter Password" name="password"/>
        </div>
        <div class="form3">
                <input type="radio" id="role1" name="role" value="ADMIN">
                <label for="role1">Admin</label>

                <input type="radio" id="role2" name="role" value="USER" checked="checked"> <!-- "checked" empeche l'utilisateur de ne rien séléctionner -->
                <label for="role2">User</label>
        </div>
        <button type="submit">Ajouter</button>
    </form>
    <span th:utext="${ok}"></span>
    <a th:href="@{/home}">Accueil</a>
    <!--<div th:if="${param.ok}">
        <span>L'utilisateur a été ajouté !</span>
    </div>
    <div th:if="${param.fail}">
        <span>Le pseudo existe déjà !</span>
    </div>-->
</div>
</body>
</html>