Page admin V1

This commit is contained in:
jleroy
2024-04-26 11:28:16 +02:00
parent 658f1c3e9c
commit 0c28a4ce14
9 changed files with 56 additions and 23 deletions

View File

@@ -17,21 +17,25 @@
<tbody>
<tr th:each="categorie : ${categories}">
<td>
<form th:action="@{/admin/new}" th:object="${categorie}" method="post">
<input type="text" th:field="*{libelle}" id="categorie" th:value="${categorie.libelle}">
<form th:action="@{/admin/update}" method="post">
<input type="text" name="newCategorie" id="newCategorie" th:value="${categorie.libelle}">
<input type="hidden" name="IdCategorie" id="IdCategorie" th:value="${categorie.id}">
<button>Sauvegarder</button>
</form>
</td>
<td>
<form th:action="@{/admin/catDelete}" method="post">
<input type="hidden" name="idCategorie" id="idCategorie" th:value="${categorie.id}">
<input type="hidden" name="deleteIdCategorie" id="deleteIdCategorie" th:value="${categorie.id}">
<button>Supprimer</button>
</form>
</td>
<td th:text="${categorie.libelle}"></td>
</tr>
</tbody>
</table>
<form th:action="@{/admin/new}" th:object="${categorie}" method="post">
<input type="text" th:field="*{libelle}" id="nom">
<button>Ajouter</button>
</form>
<h2>Liste des utilisateurs</h2>
<table>
<thead>