Ajout article v3
This commit is contained in:
@@ -1,28 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr" th:replace="~{modele-page :: layout('Ajouter un article',~{::link} , ~{::#container-main})}" xmlns:th="http://www.thymeleaf.org">
|
||||
<html th:replace="~{modele-page :: layout('Ajouter un article',~{::link} , ~{::#container-main})}" xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
</head>
|
||||
<body>
|
||||
<div id="container-main">
|
||||
<h1>Nouvelle vente</h1>
|
||||
<form th:action="@{/article/new}" method="post" enctype="multipart/form-data">
|
||||
<form th:action="@{/article/new}" method="post" th:object="${article}" enctype="multipart/form-data">
|
||||
<!-- Nom de l'article -->
|
||||
<div>
|
||||
<label for="nom">Article:</label>
|
||||
<input type="text" id="nom" th:field="*{article.nom}" required>
|
||||
<input type="text" id="nom" th:field="*{nom}" required>
|
||||
</div>
|
||||
|
||||
<!-- Description -->
|
||||
<div>
|
||||
<label for="description">Description:</label>
|
||||
<textarea id="description" th:field="*{article.desc}" required></textarea>
|
||||
<textarea id="description" th:field="*{desc}" required></textarea>
|
||||
</div>
|
||||
|
||||
<!-- Catégorie -->
|
||||
<div>
|
||||
<label for="categorie">Catégorie:</label>
|
||||
<select id="categorie" th:field="*{article.numCategorie}" required>
|
||||
<select id="categorie" th:field="*{numCategorie}" required>
|
||||
<!-- Boucle sur les catégories pour générer les options -->
|
||||
<option th:each="categorie : ${categories}" th:value="${categorie.id}" th:text="${categorie.libelle}"></option>
|
||||
</select>
|
||||
@@ -31,40 +31,40 @@
|
||||
<!-- Photo -->
|
||||
<div>
|
||||
<label for="photo">Photo de l'article:</label>
|
||||
<input type="file" id="photo" th:field="*{article.photo}" accept="image/jpeg" required>
|
||||
<input type="file" id="photo" th:field="*{photo}" accept="image/jpeg">
|
||||
</div>
|
||||
|
||||
<!-- Mise à prix -->
|
||||
<div>
|
||||
<label for="prix">Mise à prix:</label>
|
||||
<input type="number" id="prix" th:field="*{article.prixInitial}" min="0" required>
|
||||
<input type="number" id="prix" th:field="*{prixInitial}" min="0" required>
|
||||
</div>
|
||||
|
||||
<!-- Date début enchère -->
|
||||
<div>
|
||||
<label for="dateDebut">Date début enchère:</label>
|
||||
<input type="date" id="dateDebut" th:field="*{article.dateDebutEnch}" min="today" required>
|
||||
<input type="date" id="dateDebut" name="dateDebut" required>
|
||||
</div>
|
||||
|
||||
<!-- Date fin enchère -->
|
||||
<div>
|
||||
<label for="dateFin">Date fin enchère:</label>
|
||||
<input type="date" id="dateFin" th:field="*{article.dateFinEnch}" min="today" required>
|
||||
<input type="date" id="dateFin" name="dateFin" required>
|
||||
</div>
|
||||
|
||||
<!-- Lieu de retrait -->
|
||||
<h4>Retrait</h4>
|
||||
<div>
|
||||
<label for="rue">Rue:</label>
|
||||
<input type="text" id="rue" th:field="*{retrait.rue}" required>
|
||||
<input type="text" id="rue" name="rue" required>
|
||||
</div>
|
||||
<div>
|
||||
<label for="codePostal">Code postal:</label>
|
||||
<input type="text" id="codePostal" th:field="*{retrait.code_postale}" required>
|
||||
<input type="text" id="codePostal" name="code_postal" required>
|
||||
</div>
|
||||
<div>
|
||||
<label for="ville">Ville:</label>
|
||||
<input type="text" id="ville" th:field="*{retrait.ville}" required>
|
||||
<input type="text" id="ville" name="ville" required>
|
||||
</div>
|
||||
|
||||
<!-- Bouton Enregistrer -->
|
||||
|
||||
Reference in New Issue
Block a user