better article

This commit is contained in:
Parpaillax
2024-04-26 13:51:57 +02:00
parent b970ad4c30
commit 413aa031e5
4 changed files with 42 additions and 19 deletions

View File

@@ -36,6 +36,10 @@
<strong><label class="col-form-label">Prix de vente</label></strong>
<span th:text="${article.prixInitial}"></span>
</div>
<div class="mt-2 d-flex flex-row align-items-end justify-content-between">
<strong><label class="col-form-label">Dernière offre</label></strong>
<span th:text="${maxEnchere}"></span>
</div>
<div class="mt-2 d-flex flex-row align-items-end justify-content-between">
<strong><label class="col-form-label">Date fin enchère</label></strong>
<span th:text="${article.dateFinEnch}"></span>
@@ -48,15 +52,19 @@
</div>
<form th:action="@{/enchere/incEnchere}" method="post" th:object="${enchere}" class="mt-2 d-flex flex-row align-items-end justify-content-between">
<input type="hidden" id="articleId" name="articleId" th:value="${article.id}">
<label for="montantEnchere">Montant</label>
<strong><label for="montantEnchere">Montant</label></strong>
<input type="number" th:field="*{montantEnchere}" id="montantEnchere" step="0.01" min="0">
<span style="color: red;" th:if="${#fields.hasErrors('montantEnchere')}">
<span style="color: red;" th:if="${errors != null}">
<ul>
<li th:each="erreur: ${#fields.errors('montantEnchere')}" th:text="${erreur}"></li>
<li th:each="erreur: ${errors[0]}" th:text="${erreur.defaultMessage}"></li>
</ul>
</span>
<button type="submit" class="btn btn-primary">Enchérir</button>
</form>
<div class="mt-5">
<a class="btn btn-secondary" href="/accueil" th:text="'Retour'"></a>
<!-- <a th:if="${#strings.equals(${username.pseudo}, ${article.getPseudoUtilisateur()})}" class="btn btn-secondary" href="/accueil" th:text="'Modifier'"></a>-->
</div>
</div>
</div>
</div>