This commit is contained in:
mepiphana2023
2024-04-26 15:37:15 +02:00
parent df6c7c0cbc
commit 5f1c440ef3
7 changed files with 304 additions and 174 deletions

View File

@@ -1,46 +1,114 @@
home.search.title = Search for an item by name...
home.search.title = Search for an article by name...
home.search.cat = All categories
home.search.button = Search
home.button.lang = Changer en Fran\u00E7ais
home.buy.title = Purchases
home.buy.open = Open bids
home.buy.progress = My ongoing bids
home.buy.success = My won bids
home.sell.title = My Sales
home.sell.progress = My ongoing sales
home.sell.nostarted = My unsold items
home.sell.finish = My completed sales
home.button.search = Search
home.button.lang = Passer en fran\u00E7ais
home.button.lang2 = EN
home.credit = My credits:
home.nav.enchere = Auctions
home.nav.vend = Sell an item
home.nav.login = Register / Log in
home.profil.profil = Profile
home.profil.logout = Log out
home.article.sellprice = Sale price:
home.article.seller = Seller:
home.article.end = End of auction:
footer.desc = Created by the association "Objects are our friends", ENI-Auctions aims to help its members sell or buy objects of all kinds.
profil.title = My Profile
profil.button = Edit
profil.pseudo = Username:
profil.surname = First Name:
profil.name = Last Name:
profil.surname = First name:
profil.name = Last name:
profil.email = Email:
profil.phone = Phone:
profil.street = Street:
profil.postal = Zip Code:
profil.postal = Postal code:
profil.city = City:
profil.credit = Credits:
edit.profil.currentpassword = Current Password:
edit.profil.newpassword = New Password:
edit.profil.confirmnewpassword = Confirm New Password:
edit.profil.title = Edit My Profile
edit.profil.button.edit = Save Changes
edit.profil.button.del = Delete My Account
edit.profil.currentpassword = Current password:
edit.profil.newpassword = New password:
edit.profil.confirmnewpassword = Confirm new password:
edit.profil.title = Edit my profile
edit.profil.button.edit = Save changes
edit.profil.button.cancel = Cancel changes
edit.profil.button.del = Delete my account
login.title = To Log In:
login.title = Log in:
login.id = Username:
login.password = Password:
login.save = Remember Me
login.forgotpassword = Forgot Password
login.connection = Login
login.makecompte = Create an Account
login.save = Remember me
login.forgotpassword = Forgot password
login.connection = Log in
login.makecompte = Create an account
register.title = My Profile
register.button = Edit
register.pseudo = Username:
register.surname = First Name:
register.name = Last Name:
register.email = Email:
register.phone = Phone:
register.street = Street:
register.postal = Zip Code:
register.city = City:
register.credit = Credits:
register.make = create
register.cancel = cancel
register.title = Register
register.pseudo.label = Username:
register.prenom.label = First name:
register.nom.label = Last name:
register.email.label = Email:
register.telephone.label = Phone:
register.rue.label = Street:
register.code_postal.label = Postal code:
register.ville.label = City:
register.password.label = Password:
register.confirm_password.label = Confirm password:
register.submit_button = Create
register.cancel_button = Cancel
admin.panel.title = Administrator panel
admin.categories.title = List of modified categories
admin.categories.table.name = Name
admin.categories.table.action = Action
admin.categories.table.save = Save
admin.categories.table.delete = Delete
admin.categories.table.add = Add
admin.users.title = List of users
admin.users.table.id = ID
admin.users.table.username = Username
admin.users.table.lastname = Last name
admin.users.table.firstname = First name
admin.users.table.email = Email
admin.users.table.disable = Disable
admin.users.table.delete = Delete
article.add.title = Add an article
article.add.heading = New sale
article.add.form.label.name = Article:
article.add.form.label.description = Description:
article.add.form.label.category = Category:
article.add.form.label.photo = Article photo:
article.add.form.label.starting_price = Starting price:
article.add.form.label.start_date = Start date:
article.add.form.label.end_date = End date:
article.add.form.label.removal = Pickup
article.add.form.label.street = Street:
article.add.form.label.postal_code = Postal code:
article.add.form.label.city = City:
article.add.form.validation.required = This field is required.
article.add.form.validation.category = Please select a category.
article.add.form.button.save = Save
article.add.form.button.cancel = Cancel
article.details.title = Article - ARTICLENAME
article.details.heading = Article
article.details.label.description = Description
article.details.label.seller = Seller
article.details.label.category = Category
article.details.label.sale_price = Sale price
article.details.label.end_date = End of auction
article.details.label.pickup = Pickup
article.details.label.amount = Amount
article.details.button.bid = Bid
article.details.address.unknown = Unknown address
article.details.validation.amount.required = Bid amount is required.

View File

@@ -1,14 +1,29 @@
home.search.title = Rechercher un article par nom...
home.search.cat = Toutes les cat\u00e9gories
home.search.button = Recherche
home.buy.title = Achats
home.buy.open = Ench\u00e8res ouvertes
home.buy.progress = Mes ench\u00E8res en cours
home.buy.success = Mes ench\u00E8res remport\u00e9es
home.sell.title = Mes Ventes
home.sell.progress = Mes ventes en cours
home.sell.nostarted = Mes ventes non d\u00e9but\u00e9es
home.sell.finish = Mes ventes termin\u00E9es
home.button.search = Recherche
home.button.lang = Switch to English
home.button.lang2 = FR
home.credit = Mes cr\u00e9dits :
home.nav.enchere = Encheres
home.nav.vend = Vendre un article
home.nav.login= S'inscrire / Se connecter
home.nav.login = S'inscrire / Se connecter
home.profil.profil = Profil
home.profil.logout = D\u00e9connexion
home.article.sellprice = Prix de vente:
home.article.seller = Vendeur:
home.article.end = Fin de l'ench\u00E8re:
footer.desc = Cr\u00e9\u00e9e par l'association "Les objets sont nos amis", ENI-Ench\u00e9res a pour objectif d'aider ses membres \u00E0 vendre ou acheter des objets de tout genre.
footer.
profil.title = Mon profile
profil.button = Modifier
@@ -52,3 +67,50 @@ register.password.label = Mot de passe:
register.confirm_password.label = Confirmation du mot de passe:
register.submit_button = Cr\u00E9er
register.cancel_button = Annuler
admin.panel.title = Panel administrateur
admin.categories.title = Liste des cat\u00E9gories modifi\u00E9es
admin.categories.table.name = Nom
admin.categories.table.action = Action
admin.categories.table.save = Enregistrer
admin.categories.table.delete = Supprimer
admin.categories.table.add = Ajouter
admin.users.title = Liste des utilisateurs
admin.users.table.id = ID
admin.users.table.username = Pseudo
admin.users.table.lastname = Nom
admin.users.table.firstname = Pr\u00E9nom
admin.users.table.email = Email
admin.users.table.disable = D\u00E9sactiver
admin.users.table.delete = Supprimer
article.add.title = Ajouter un article
article.add.heading = Nouvelle vente
article.add.form.label.name = Article:
article.add.form.label.description = Description:
article.add.form.label.category = Cat\u00E9gorie:
article.add.form.label.photo = Photo de l'article:
article.add.form.label.starting_price = Mise \u00E0 prix:
article.add.form.label.start_date = Date d\u00E9but ench\u00E8re:
article.add.form.label.end_date = Date fin ench\u00E8re:
article.add.form.label.removal = Retrait
article.add.form.label.street = Rue:
article.add.form.label.postal_code = Code postal:
article.add.form.label.city = Ville:
article.add.form.validation.required = Ce champ est requis.
article.add.form.validation.category = Veuillez s\u00E9lectionner une cat\u00E9gorie.
article.add.form.button.save = Enregistrer
article.add.form.button.cancel = Annuler
article.details.title = Article - NOMARTICLE
article.details.heading = Article
article.details.label.description = Description
article.details.label.seller = Vendeur
article.details.label.category = Cat\u00E9gorie
article.details.label.sale_price = Prix de vente
article.details.label.end_date = Date fin ench\u00E8re
article.details.label.pickup = Retrait
article.details.label.amount = Montant
article.details.button.bid = Ench\u00E9rir
article.details.address.unknown = Adresse inconnue
article.details.validation.amount.required = Le montant de l'ench\u00E8re est requis.

View File

@@ -52,22 +52,22 @@
<div class="mb-3">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="typeTransaction" id="achats" value="achats" onchange="toggleCheckbox(this.value)">
<label class="form-check-label" for="achats">Achats</label>
<label class="form-check-label" for="achats" th:text="#{home.sell.title}"></label>
</div>
</div>
<!-- Checkboxes pour Achats -->
<div id="achatsOptions">
<div class="form-check">
<input class="form-check-input" type="checkbox" name="achatOption" id="encheresOuvertes" th:value="encheresOuvertes" disabled>
<label class="form-check-label" for="encheresOuvertes">Enchères ouvertes</label>
<label class="form-check-label" for="encheresOuvertes" th:text="#{home.buy.open}"></label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" name="achatOption" id="enchereEnCours" th:value="enchereEnCours" disabled>
<label class="form-check-label" for="enchereEnCours">Mes enchères en cours</label>
<label class="form-check-label" for="enchereEnCours" th:text="#{home.buy.progress}"></label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" name="achatOption" id="enchereRemportees" th:value="enchereRemportees" disabled>
<label class="form-check-label" for="enchereRemportees">Mes enchères remportées</label>
<label class="form-check-label" for="enchereRemportees" th:text="#{home.buy.success}"></label>
</div>
</div>
</div>
@@ -76,22 +76,22 @@
<div class="mb-3">
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" name="typeTransaction" id="ventes" value="ventes" onchange="toggleCheckbox(this.value)">
<label class="form-check-label" for="ventes">Mes Ventes</label>
<label class="form-check-label" for="ventes" th:text="#{home.sell.title}"></label>
</div>
</div>
<!-- Checkboxes pour Ventes -->
<div id="ventesOptions">
<div class="form-check">
<input class="form-check-input" type="checkbox" th:name="venteOption" id="venteEnCours" th:value="venteEnCours" disabled>
<label class="form-check-label" for="venteEnCours">Mes ventes en cours</label>
<label class="form-check-label" for="venteEnCours" th:text="#{home.sell.progress}"></label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" th:name="venteOption" id="ventesNonDebutees" th:value="ventesNonDebutees" disabled>
<label class="form-check-label" for="ventesNonDebutees">Mes ventes non débutées</label>
<label class="form-check-label" for="ventesNonDebutees" th:text="#{home.sell.nostarted}"></label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" th:name="venteOption" id="ventesTerminees" th:value="ventesTerminees" disabled>
<label class="form-check-label" for="ventesTerminees">Mes ventes terminées</label>
<label class="form-check-label" for="ventesTerminees" th:text="#{home.sell.finish}"></label>
</div>
</div>
</div>
@@ -108,7 +108,7 @@
</div>
<div class="row">
<div class="col-md-12 col-12 d-flex justify-content-center align-items-center">
<button type="submit" style="font-size: 1em;" class="btn btn-primary btn-lg w-100">Recherche</button>
<button type="submit" style="font-size: 1em;" class="btn btn-primary btn-lg w-100" th:text="#{home.button.search}"></button>
</div>
</div>
</form>
@@ -126,16 +126,16 @@
</div>
<div class="col-md-8">
<div class="card-body d-flex flex-column ">
<h5 class="text-dark card-title text" th:text="${article.nom}">Nom de l'article</h5>
<p class="text-dark card-text mb-auto" th:text="${article.desc}">Description</p>
<h5 class="text-dark card-title text" th:text="${article.nom}"></h5>
<p class="text-dark card-text mb-auto" th:text="${article.desc}"></p>
<div class="text-dark d-flex justify-content-between align-items-center">
<div>
<h6>Prix de vente: <span th:text="${article.prixVente}"></span></h6>
<h6>Vendeur: <span th:text="${article.pseudoUtilisateur}"></span> </h6>
<h6 th:text="#{home.article.sellprice}"> <span th:text="${article.prixVente}"></span></h6>
<h6 th:text="#{home.article.seller}"> <span th:text="${article.pseudoUtilisateur}"></span> </h6>
</div>
</div>
<br>
<h6 class="text-muted">Fin de l'enchère: <span th:text="${#dates.format(article.dateFinEnch, 'dd/MM/yyyy')}"></span></h6>
<h6 class="text-muted"> <span th:text="${#dates.format(article.dateFinEnch, 'dd/MM/yyyy')}"></span></h6>
</div>
</div>
</div>

View File

@@ -1,17 +1,18 @@
<!DOCTYPE html>
<html th:replace="~{modele-page :: layout('Panel administrateur',~{::link} , ~{::#container-main})}" xmlns:th="http://www.thymeleaf.org">
<html th:replace="~{modele-page :: layout('__${#messages.msg('admin.panel.title')}__',~{::link} , ~{::#container-main})}" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title th:text="#{admin.panel.title}">Panel administrateur</title>
<link rel="stylesheet" type="text/css" href="style.css"> <!-- Ajoutez le lien vers votre fichier CSS si nécessaire -->
</head>
<body>
<div id="container-main">
<h2>Liste des catégories modifiées</h2>
<h2 th:text="#{admin.categories.title}">Liste des catégories modifiées</h2>
<table>
<thead>
<tr>
<th>Nom</th>
<th>Action</th>
<th th:text="#{admin.categories.table.name}">Nom</th>
<th th:text="#{admin.categories.table.action}">Action</th>
</tr>
</thead>
<tbody>
@@ -20,13 +21,13 @@
<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>
<button th:text="#{admin.categories.table.save}">Sauvegarder</button>
</form>
</td>
<td>
<form th:action="@{/admin/catDelete}" method="post">
<input type="hidden" name="deleteIdCategorie" id="deleteIdCategorie" th:value="${categorie.id}">
<button>Supprimer</button>
<button th:text="#{admin.categories.table.delete}">Supprimer</button>
</form>
</td>
</tr>
@@ -34,18 +35,18 @@
</table>
<form th:action="@{/admin/new}" th:object="${categorie}" method="post">
<input type="text" th:field="*{libelle}" id="nom">
<button>Ajouter</button>
<button th:text="#{admin.categories.table.add}">Ajouter</button>
</form>
<h2>Liste des utilisateurs</h2>
<h2 th:text="#{admin.users.title}">Liste des utilisateurs</h2>
<table>
<thead>
<tr>
<th>ID</th>
<th>Pseudo</th>
<th>Nom</th>
<th>Prénom</th>
<th>Email</th>
<th>Action</th>
<th th:text="#{admin.users.table.id}">ID</th>
<th th:text="#{admin.users.table.username}">Pseudo</th>
<th th:text="#{admin.users.table.lastname}">Nom</th>
<th th:text="#{admin.users.table.firstname}">Prénom</th>
<th th:text="#{admin.users.table.email}">Email</th>
<th th:text="#{admin.users.table.action}">Action</th>
</tr>
</thead>
<tbody>
@@ -58,11 +59,11 @@
<td>
<form th:action="@{/admin/disabled}" method="post">
<input type="hidden" name="userDisabled" id="userDisabled" th:value="${user.id}">
<button >Désactiver</button>
<button th:text="#{admin.users.table.disable}">Désactiver</button>
</form>
<form th:action="@{/admin/delete}" method="post">
<input type="hidden" name="userDelete" id="userDelete" th:value="${user.id}">
<button>Supprimer</button>
<button th:text="#{admin.users.table.delete}">Supprimer</button>
</form>
</td>
</tr>

View File

@@ -1,15 +1,15 @@
<!DOCTYPE html>
<html th:replace="~{modele-page :: layout('Article - NOMARTICLE',~{::link} , ~{::#container-main})}" xmlns:th="http://www.thymeleaf.org">
<html th:replace="~{modele-page :: layout('${articleDetailsTitle}',~{::link} , ~{::#container-main})}" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
</head>
<body>
<div id="container-main">
<body>
<div id="container-main">
<div class="row mt-3">
<div class="col-md-6 offset-md-3">
<div class="card">
<div class="card-header">
<h4>Article</h4>
<h4 th:text="#{article.details.heading}"></h4>
</div>
<div class="card-body">
<div class="row">
@@ -21,41 +21,41 @@
<h1 th:text="${article.nom}"></h1>
</div>
<div class="mt-2 d-flex flex-row align-items-end justify-content-between">
<strong><label class="col-form-label">Description</label></strong>
<strong><label class="col-form-label" th:text="#{article.details.label.description}"></label></strong>
<span th:text="${article.desc}"></span>
</div>
<div class="mt-2 d-flex flex-row align-items-end justify-content-between">
<strong><label class="col-form-label">Vendeur</label></strong>
<strong><label class="col-form-label" th:text="#{article.details.label.seller}"></label></strong>
<span th:text="${username.pseudo}"></span>
</div>
<div class="mt-2 d-flex flex-row align-items-end justify-content-between">
<strong><label class="col-form-label">Catégorie</label></strong>
<strong><label class="col-form-label" th:text="#{article.details.label.category}"></label></strong>
<span th:text="${cate}"></span>
</div>
<div class="mt-2 d-flex flex-row align-items-end justify-content-between">
<strong><label class="col-form-label">Prix de vente</label></strong>
<strong><label class="col-form-label" th:text="#{article.details.label.sale_price}"></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">Date fin enchère</label></strong>
<strong><label class="col-form-label" th:text="#{article.details.label.end_date}"></label></strong>
<span th:text="${article.dateFinEnch}"></span>
</div>
<!-- Rajouter une condition sur retrait pour l'afficher uniquement quand -->
<!-- la vente est gagné ET à l'utilisateur qui a remporté la vente-->
<!-- Rajouter une condition sur retrait pour l'afficher uniquement quand -->
<!-- la vente est gagné ET à l'utilisateur qui a remporté la vente-->
<div class="mt-2 d-flex flex-row align-items-end justify-content-between">
<strong><label class="col-form-label">Retrait</label></strong>
<span th:text="${retrait} ? ${retrait.rue} + ' ' + ${retrait.code_postale} + ' ' + ${retrait.ville} : 'Adresse inconnue'"></span>
<strong><label class="col-form-label" th:text="#{article.details.label.pickup}"></label></strong>
<span th:text="${retrait} ? ${retrait.rue} + ' ' + ${retrait.code_postale} + ' ' + ${retrait.ville} : #{article.details.address.unknown}"></span>
</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>
<label for="montantEnchere" th:text="#{article.details.label.amount}"></label>
<input type="number" th:field="*{montantEnchere}" id="montantEnchere" step="0.01" min="0">
<span style="color: red;" th:if="${#fields.hasErrors('montantEnchere')}">
<ul>
<li th:each="erreur: ${#fields.errors('montantEnchere')}" th:text="${erreur}"></li>
</ul>
</span>
<button type="submit" class="btn btn-primary">Enchérir</button>
<button type="submit" class="btn btn-primary" th:text="#{article.details.button.bid}"></button>
</form>
</div>
</div>
@@ -63,6 +63,6 @@
</div>
</div>
</div>
</div>
</body>
</div>
</body>
</html>

View File

@@ -69,8 +69,7 @@
<h6 class="text-uppercase fw-bold mb-4">
<i class="fas fa-gem me-3"></i>ENI-Encheres
</h6>
<p>
Créée par l'association "Les objets sont nos amis", ENI-Enchères a pour objectif d'aider ses membres à vendre ou acheter des objets de tout genre.
<p th:text="#{footer.desc}">
</p>
</div>
@@ -79,13 +78,13 @@
Menu
</h6>
<p>
<a href="#!" class="text-reset">Encheres</a>
<a href="/accueil" class="text-reset" th:text="#{home.nav.enchere}"></a>
</p>
<p>
<a href="#!" class="text-reset">Vendre un article</a>
<a href="/article/new" class="text-reset" th:text="#{home.nav.vend}"></a>
</p>
<p>
<a href="#!" class="text-reset">Mon profile</a>
<a href="/profil" class="text-reset" th:text="#{profil.title}"></a>
</p>
</div>

View File

@@ -6,76 +6,76 @@
</head>
<body>
<div id="container-main" class="container py-5">
<h1 class="mb-4">Nouvelle vente</h1>
<h1 class="mb-4" th:text="#{article.add.heading}">Nouvelle vente</h1>
<form th:action="@{/article/new}" method="post" th:object="${article}" enctype="multipart/form-data" class="needs-validation" novalidate>
<div class="mb-3">
<label for="nom" class="form-label">Article:</label>
<label for="nom" class="form-label" th:text="#{article.add.form.label.name}">Article:</label>
<input type="text" class="form-control" th:field="*{nom}" id="nom" required>
<div class="invalid-feedback">Ce champ est requis.</div>
<div class="invalid-feedback" th:text="#{article.add.form.validation.required}">Ce champ est requis.</div>
</div>
<div class="mb-3">
<label for="description" class="form-label">Description:</label>
<label for="description" class="form-label" th:text="#{article.add.form.label.description}">Description:</label>
<textarea class="form-control" th:field="*{desc}" id="description" required></textarea>
<div class="invalid-feedback">Ce champ est requis.</div>
<div class="invalid-feedback" th:text="#{article.add.form.validation.required}">Ce champ est requis.</div>
</div>
<div class="mb-3">
<label for="categorie" class="form-label">Catégorie:</label>
<label for="categorie" class="form-label" th:text="#{article.add.form.label.category}">Catégorie:</label>
<select class="form-control" th:field="*{numCategorie}" id="categorie" required>
<option th:each="categorie : ${categories}" th:value="${categorie.id}" th:text="${categorie.libelle}"></option>
</select>
<div class="invalid-feedback">Veuillez sélectionner une catégorie.</div>
<div class="invalid-feedback" th:text="#{article.add.form.validation.category}">Veuillez sélectionner une catégorie.</div>
</div>
<div class="mb-3">
<label for="photo" class="form-label">Photo de l'article:</label>
<label for="photo" class="form-label" th:text="#{article.add.form.label.photo}">Photo de l'article:</label>
<input type="file" class="form-control" th:field="*{photo}" id="photo" accept="image/jpeg">
</div>
<div class="mb-3">
<label for="prix" class="form-label">Mise à prix:</label>
<label for="prix" class="form-label" th:text="#{article.add.form.label.starting_price}">Mise à prix:</label>
<input type="number" class="form-control" th:field="*{prixInitial}" id="prix" min="0" max="2000000000" step="0.01" required>
<div class="invalid-feedback">Ce champ est requis.</div>
<div class="invalid-feedback" th:text="#{article.add.form.validation.required}">Ce champ est requis.</div>
</div>
<div class="mb-3">
<label for="dateDebut" class="form-label">Date début enchère:</label>
<label for="dateDebut" class="form-label" th:text="#{article.add.form.label.start_date}">Date début enchère:</label>
<input type="date" class="form-control" id="dateDebut" name="dateDebut" required>
<div class="invalid-feedback">Ce champ est requis.</div>
<div class="invalid-feedback" th:text="#{article.add.form.validation.required}">Ce champ est requis.</div>
</div>
<div class="mb-3">
<label for="dateFin" class="form-label">Date fin enchère:</label>
<label for="dateFin" class="form-label" th:text="#{article.add.form.label.end_date}">Date fin enchère:</label>
<input type="date" class="form-control" id="dateFin" name="dateFin" required>
<div class="invalid-feedback">Ce champ est requis.</div>
<div class="invalid-feedback" th:text="#{article.add.form.validation.required}">Ce champ est requis.</div>
</div>
<h4>Retrait</h4>
<h4 th:text="#{article.add.form.label.removal}">Retrait</h4>
<div class="mb-3">
<label for="rue" class="form-label">Rue:</label>
<label for="rue" class="form-label" th:text="#{article.add.form.label.street}">Rue:</label>
<input type="text" class="form-control" id="rue" name="rue" th:field="${user.rue}" required>
<div class="invalid-feedback">Ce champ est requis.</div>
<div class="invalid-feedback" th:text="#{article.add.form.validation.required}">Ce champ est requis.</div>
</div>
<div class="mb-3">
<label for="codePostal" class="form-label">Code postal:</label>
<label for="codePostal" class="form-label" th:text="#{article.add.form.label.postal_code}">Code postal:</label>
<input type="text" class="form-control" id="codePostal" name="code_postal" th:field="${user.code_postal}" required>
<div class="invalid-feedback">Ce champ est requis.</div>
<div class="invalid-feedback" th:text="#{article.add.form.validation.required}">Ce champ est requis.</div>
</div>
<div class="mb-3">
<label for="ville" class="form-label">Ville:</label>
<label for="ville" class="form-label" th:text="#{article.add.form.label.city}">Ville:</label>
<input type="text" class="form-control" id="ville" name="ville" th:field="${user.ville}" required>
<div class="invalid-feedback">Ce champ est requis.</div>
<div class="invalid-feedback" th:text="#{article.add.form.validation.required}">Ce champ est requis.</div>
</div>
<button type="submit" class="btn btn-primary">Enregistrer</button>
<button type="submit" class="btn btn-primary" th:text="#{article.add.form.button.save}">Enregistrer</button>
<div th:if="${param.erreur != null}" class="mt-3">
<p style="color: red;" th:text="${param.erreur}"></p>
</div>
</form>
<form th:action="@{/accueil}" method="post" class="mt-3">
<button type="submit" class="btn btn-secondary">Annuler</button>
<button type="submit" class="btn btn-secondary" th:text="#{article.add.form.button.cancel}">Annuler</button>
</form>
<script>
var today = new Date();