This commit is contained in:
Parpaillax
2024-04-24 15:08:25 +02:00
15 changed files with 174 additions and 86 deletions

View File

@@ -1,5 +1,7 @@
package fr.eni.enchere.bo; package fr.eni.enchere.bo;
import org.springframework.web.multipart.MultipartFile;
import java.util.Date; import java.util.Date;
public class Article { public class Article {
@@ -7,18 +9,19 @@ public class Article {
int id; int id;
String nom; String nom;
String desc; String desc;
String photo; MultipartFile photo;
Date dateDebutEnch; Date dateDebutEnch;
Date dateFinEnch; Date dateFinEnch;
float prixInitial; float prixInitial;
float prixVente; float prixVente;
UserProfil Utilisateur; int Utilisateur;
String pseudoUtilisateur;
int numCategorie; int numCategorie;
public Article() { public Article() {
} }
public Article(int id, String nom, String desc, String photo, Date dateDebutEnch, Date dateFinEnch, float prixInitial, float prixVente, UserProfil Utilisateur, int numCategorie) { public Article(int id, String nom, String desc, MultipartFile photo, Date dateDebutEnch, Date dateFinEnch, float prixInitial, float prixVente, int Utilisateur, String pseudoUtilisateur, int numCategorie) {
setId(id); setId(id);
setNom(nom); setNom(nom);
setDesc(desc); setDesc(desc);
@@ -27,7 +30,7 @@ public class Article {
setDateFinEnch(dateFinEnch); setDateFinEnch(dateFinEnch);
setPrixInitial(prixInitial); setPrixInitial(prixInitial);
setPrixVente(prixVente); setPrixVente(prixVente);
setUtilisateur(Utilisateur); setNoUtilisateur(Utilisateur);
setNumCategorie(numCategorie); setNumCategorie(numCategorie);
} }
@@ -55,11 +58,11 @@ public class Article {
this.desc = desc; this.desc = desc;
} }
public String getPhoto() { public MultipartFile getPhoto() {
return photo; return photo;
} }
public void setPhoto(String photo) { public void setPhoto(MultipartFile photo) {
this.photo = photo; this.photo = photo;
} }
@@ -95,14 +98,22 @@ public class Article {
this.prixVente = prixVente; this.prixVente = prixVente;
} }
public UserProfil getUtilisateur() { public int getUtilisateur() {
return Utilisateur; return Utilisateur;
} }
public void setUtilisateur(UserProfil Utilisateur) { public void setNoUtilisateur(int Utilisateur) {
this.Utilisateur = Utilisateur; this.Utilisateur = Utilisateur;
} }
public String getPseudoUtilisateur() {
return pseudoUtilisateur;
}
public void setPseudoUtilisateur(String pseudoUtilisateur) {
this.pseudoUtilisateur = pseudoUtilisateur;
}
public int getNumCategorie() { public int getNumCategorie() {
return numCategorie; return numCategorie;
} }

View File

@@ -8,9 +8,15 @@ import fr.eni.enchere.bo.Article;
import fr.eni.enchere.bo.Retrait; import fr.eni.enchere.bo.Retrait;
import fr.eni.enchere.bo.UserProfil; import fr.eni.enchere.bo.UserProfil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.text.SimpleDateFormat;
import java.util.Date;
@Controller() @Controller()
@RequestMapping("/article") @RequestMapping("/article")
@@ -31,7 +37,7 @@ public class ArticleController {
@GetMapping @GetMapping
public String viewArticle(Model model) { public String viewArticle(Model model) {
return "accueil"; return "redirect:/accueil";
} }
//Affichage d'un article //Affichage d'un article
@@ -60,15 +66,31 @@ public class ArticleController {
} }
@PostMapping("/new") @PostMapping("/new")
public String newArticle(@RequestParam("article") Article article, @RequestParam("retrait") Retrait retrait) { public String newArticle(@ModelAttribute("article") Article article,
//Récupérer l'utilisateur pour set @RequestParam("rue") String rue,
System.out.println(article.getNumCategorie()); @RequestParam("code_postal") String code_postal,
@RequestParam("ville") String ville,
@RequestParam("dateDebut") String dateDebut,
@RequestParam("dateFin") String datefin) {
//Récupérer l'utilisateur pour set l'article
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
String username = authentication.getName();
UserProfil userProfile = userService.utilisateurByName(username);
article.setUtilisateur(userProfile.getId());
//Récupérer le lieu de retrait
Retrait retrait = new Retrait();
retrait.setRue(rue);
retrait.setCode_postale(code_postal);
retrait.setVille(ville);
//Reste de l'article
//Date dDateDebut = new SimpleDateFormat(dateDebut);
//article.setDateDebutEnch();
if (article.getId() == 0){ if (article.getId() == 0){
//Création d'un article //Création d'un article
} else { } else {
//Mise à jour d'un article //Mise à jour d'un article
} }
//articleService.saveArticle(article);
return "redirect:/accueil"; return "redirect:/accueil";
} }

View File

@@ -7,19 +7,25 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.LocaleResolver; import org.springframework.web.servlet.LocaleResolver;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import org.springframework.web.servlet.support.RequestContextUtils; import org.springframework.web.servlet.support.RequestContextUtils;
import java.util.Locale; import java.util.Locale;
@Controller @Controller
public class LanguageController { public class LanguageController {
private final LocaleResolver localeResolver;
public LanguageController(LocaleResolver localeResolver) {
this.localeResolver = localeResolver;
}
@GetMapping("/change-language") @GetMapping("/change-language")
public String changeLanguage(HttpServletRequest request, HttpServletResponse response, @RequestParam("lang") String lang, @RequestHeader String referer) { public String changeLanguage(HttpServletRequest request, HttpServletResponse response, @RequestParam("lang") String lang) {
LocaleResolver localeResolver = RequestContextUtils.getLocaleResolver(request); LocaleResolver localeResolver = RequestContextUtils.getLocaleResolver(request);
if (localeResolver != null) { if (localeResolver != null) {
localeResolver.setLocale(request, response, new Locale(lang)); localeResolver.setLocale(request, response, Locale.forLanguageTag(lang));
} }
return "redirect:" + referer; return "redirect:/";
} }
} }

View File

@@ -31,22 +31,16 @@ public class ArticleRepositoryImpl implements ArticleRepository {
@Override @Override
public Article mapRow(ResultSet rs, int rowNum) throws SQLException { public Article mapRow(ResultSet rs, int rowNum) throws SQLException {
Article article = new Article(); Article article = new Article();
article.setId(rs.getInt("no_article")); article.setId(rs.getInt("a.no_article"));
article.setNom(rs.getString("nom_article")); article.setNom(rs.getString("a.nom_article"));
article.setDesc(rs.getString("description")); article.setDesc(rs.getString("a.description"));
article.setDateDebutEnch(rs.getDate("date_debut_encheres")); article.setDateDebutEnch(rs.getDate("a.date_debut_encheres"));
article.setDateFinEnch(rs.getDate("date_fin_encheres")); article.setDateFinEnch(rs.getDate("a.date_fin_encheres"));
article.setPrixInitial(rs.getFloat("prix_initial")); article.setPrixInitial(rs.getFloat("a.prix_initial"));
article.setPrixVente(rs.getFloat("prix_vente")); article.setPrixVente(rs.getFloat("a.prix_vente"));
article.setNoUtilisateur(rs.getInt("u.no_utilisateur"));
UserProfil user = userService.utilisateurById(rs.getInt("no_utilisateur")); article.setPseudoUtilisateur(rs.getString("u.pseudo"));
if (user != null) { article.setNumCategorie(rs.getInt("a.no_categorie"));
article.setUtilisateur(user);
} else {
logger.error("erreur de l'utilisateur");
}
article.setNumCategorie(rs.getInt("no_categorie"));
return article; return article;
} }
} }
@@ -59,24 +53,26 @@ public class ArticleRepositoryImpl implements ArticleRepository {
@Override @Override
public List<Article> findAllArticle() { public List<Article> findAllArticle() {
String sql = "SELECT * FROM ARTICLES_VENDUS"; String sql = "SELECT * FROM ARTICLES_VENDUS a";
List<Article> articles = jdbcTemplate.query(sql, new ArticleRowMapper()); List<Article> articles = jdbcTemplate.query(sql, new ArticleRowMapper());
return articles; return articles;
} }
@Override @Override
public List<Article> searchArticle(SearchArticleCritere critere) { public List<Article> searchArticle(SearchArticleCritere critere) {
StringBuilder sql = new StringBuilder("SELECT * FROM ARTICLES_VENDUS WHERE 1 = 1 AND isDelete = 0"); StringBuilder sql = new StringBuilder("SELECT a.*, u.* FROM ARTICLES_VENDUS a ");
sql.append("JOIN UTILISATEURS u ON a.no_utilisateur = u.no_utilisateur ");
sql.append("WHERE 1 = 1 AND a.isDelete = 0");
List<Object> params = new ArrayList<>(); List<Object> params = new ArrayList<>();
if (critere.getNoCategorie() != null) { if (critere.getNoCategorie() != null) {
sql.append(" AND no_categorie = ?"); sql.append(" AND a.no_categorie = ?");
params.add(critere.getNoCategorie()); params.add(critere.getNoCategorie());
} }
if (critere.getTitle() != null && !critere.getTitle().isEmpty()) { if (critere.getTitle() != null && !critere.getTitle().isEmpty()) {
sql.append(" AND nom_article LIKE ?"); sql.append(" AND a.nom_article LIKE ?");
params.add( '%' + critere.getTitle() + "%"); params.add('%' + critere.getTitle() + '%');
} }
return jdbcTemplate.query(sql.toString(), new ArticleRowMapper(), params.toArray()); return jdbcTemplate.query(sql.toString(), new ArticleRowMapper(), params.toArray());
@@ -89,7 +85,7 @@ public class ArticleRepositoryImpl implements ArticleRepository {
@Override @Override
public List<Article> findArticleByTitle(String title) { public List<Article> findArticleByTitle(String title) {
String sql = "SELECT * FROM ARTICLES_VENDUS WHERE nom_article LIKE ?"; String sql = "SELECT * FROM ARTICLES_VENDUS a WHERE nom_article LIKE ?";
List<Article> articles = jdbcTemplate.query(sql, new ArticleRowMapper(), "%" + title + "%"); List<Article> articles = jdbcTemplate.query(sql, new ArticleRowMapper(), "%" + title + "%");
return articles; return articles;
} }

View File

@@ -17,13 +17,16 @@ public class WebSecurityConfig{
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
http.authorizeHttpRequests((requests) -> requests http.authorizeHttpRequests((requests) -> requests
.requestMatchers("/", "/accueil").permitAll() .requestMatchers("/", "/accueil").permitAll()
.requestMatchers("/accueil", "/login", "/inscription/**", "/searchArticle", "/article/**", "/change-language").permitAll() .requestMatchers("/accueil", "/login", "/inscription/**", "/searchArticle", "/article/show", "/change-language").permitAll()
.requestMatchers("/css/**", "/images/**", "/assets/**", "/img/**", "/js/**", "/assets/**").permitAll() .requestMatchers("/css/**", "/images/**", "/assets/**", "/img/**", "/js/**", "/assets/**", "/i18n/**").permitAll()
.requestMatchers("/profil/**", "/article/new/**", "/article/update", "/article/delete").authenticated() .requestMatchers("/profil/**", "/article/new/**", "/article/update", "/article/delete").authenticated()
.requestMatchers("/admin").hasRole("ADMIN") .requestMatchers("/admin").hasRole("ADMIN")
.anyRequest().authenticated()) .anyRequest().authenticated())
.formLogin((form) -> form.loginPage("/login").defaultSuccessUrl("/", true)) .formLogin((form) -> form
.logout((logout) -> logout.clearAuthentication(true).invalidateHttpSession(true) .loginPage("/login")
.defaultSuccessUrl("/", true))
.logout((logout) -> logout
.clearAuthentication(true).invalidateHttpSession(true)
.deleteCookies("JSESSIONID").logoutSuccessUrl("/login?logout") .deleteCookies("JSESSIONID").logoutSuccessUrl("/login?logout")
.logoutRequestMatcher(new AntPathRequestMatcher("/logout")).permitAll()); .logoutRequestMatcher(new AntPathRequestMatcher("/logout")).permitAll());

View File

@@ -1 +1,44 @@
accueil.search.title = Search for an article by name... home.search.title = Search for an item by name...
home.search.cat = All categories
home.search.button = Search
profil.title = My Profile
profil.button = Edit
profil.pseudo = Username:
profil.surname = First Name:
profil.name = Last Name:
profil.email = Email:
profil.phone = Phone:
profil.street = Street:
profil.postal = Zip 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
login.title = To Log In:
login.id = Username:
login.password = Password:
login.save = Remember Me
login.forgotpassword = Forgot Password
login.connection = Login
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

View File

@@ -1,6 +1,6 @@
accueil.search.title = Rechercher un article par nom... home.search.title = Rechercher un article par nom...
accueil.search.cat = Toutes les cat\u00e9gories home.search.cat = Toutes les cat\u00e9gories
accueil.search.button = Recherche home.search.button = Recherche
profil.title = Mon profile profil.title = Mon profile
profil.button = Modifier profil.button = Modifier

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="fr" th:replace="~{modele-page :: layout('Accueil - ENI-Enchères',~{::link} , ~{::#container-main})}" xmlns:th="http://www.thymeleaf.org"> <html th:replace="~{modele-page :: layout('Accueil - ENI-Enchères',~{::link} , ~{::#container-main})}" xmlns:th="http://www.thymeleaf.org">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
</head> </head>
@@ -9,21 +9,25 @@
<div class="row mb-4"> <div class="row mb-4">
<div class="col-12"> <div class="col-12">
<!-- Formulaire de recherche avec sélection de catégorie --> <!-- Formulaire de recherche avec sélection de catégorie -->
<form th:action="@{/accueil}" method="post" class="mb-3"> <div class="card">
<div class="card-body">
<form th:action="@{/accueil}" method="post" class="row g-3 align-items-center">
<div class="col-md-8">
<!-- Barre de recherche --> <!-- Barre de recherche -->
<div class="mb-3"> <input type="text" class="form-control" th:attr="placeholder=#{home.search.title}" name="searchTitle">
<input type="text" class="form-control" th:attr="placeholder=#{accueil.search.title}" name="searchTitle"> <select class="form-control mt-2" name="searchCategory">
</div> <option value="" th:text="#{home.search.cat}"></option>
<div class="mb-3">
<select class="form-control" name="searchCategory">
<option value="" th:text="#{accueil.search.cat}"></option>
<option th:each="category : ${categories}" th:value="${category.id}" th:text="${category.libelle}"></option> <option th:each="category : ${categories}" th:value="${category.id}" th:text="${category.libelle}"></option>
</select> </select>
</div> </div>
<button type="submit" class="btn btn-primary"th:text="#{accueil.search.button}"></button> <div class="col-md-4 text-center">
<button type="submit" class="btn btn-primary" th:text="#{home.search.button}">Search</button>
</div>
</form> </form>
</div> </div>
</div> </div>
</div>
</div>
<div class="row"> <div class="row">
<div th:each="article : ${articles}" class="col-md-6 mb-4"> <div th:each="article : ${articles}" class="col-md-6 mb-4">
<div class="card shadow-sm h-100"> <div class="card shadow-sm h-100">
@@ -39,7 +43,7 @@
<div> <div>
<h6>Prix de vente: <span th:text="${article.prixVente}"></span></h6> <h6>Prix de vente: <span th:text="${article.prixVente}"></span></h6>
<h6>Vendeur: <span th:text="${article.utilisateur.getPseudo()}"></span> </h6> <h6>Vendeur: <span th:text="${article.pseudoUtilisateur}"></span> </h6>
</div> </div>
</div> </div>
</br> </br>

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="fr" th:replace="~{modele-page :: layout('Panel administrateur',~{::link} , ~{::#container-main})}" xmlns:th="http://www.thymeleaf.org"> <html th:replace="~{modele-page :: layout('Panel administrateur',~{::link} , ~{::#container-main})}" xmlns:th="http://www.thymeleaf.org">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
</head> </head>

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="fr" th:replace="~{modele-page :: layout('Article - NOMARTICLE',~{::link} , ~{::#container-main})}" xmlns:th="http://www.thymeleaf.org"> <html th:replace="~{modele-page :: layout('Article - NOMARTICLE',~{::link} , ~{::#container-main})}" xmlns:th="http://www.thymeleaf.org">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
</head> </head>

View File

@@ -112,7 +112,7 @@
<input type="hidden" th:field="*{id}" id="userId" th:value="${userProfile.id}"> <input type="hidden" th:field="*{id}" id="userId" th:value="${userProfile.id}">
<div class="d-flex justify-content-end align-items-center"> <div class="d-flex justify-content-end align-items-center">
<a class="btn btn-secondary" href="/accueil" th:text="#{edit.profil.button.cancel}"></a> <a class="btn btn-secondary" href="/accueil" th:text="#{edit.profil.button.cancel}"></a>
<button type="submit" class="btn btn-primary ml-2" th:text="#{edit.profil.button.edit}"></button> <button type="submit" class="btn btn-primary border-right ml-2" th:text="#{edit.profil.button.edit}"></button>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="fr" th:replace="~{modele-page :: layout('Inscription',~{::link} , ~{::#container-main})}" xmlns:th="http://www.thymeleaf.org"> <html th:replace="~{modele-page :: layout('Inscription',~{::link} , ~{::#container-main})}" xmlns:th="http://www.thymeleaf.org">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
</head> </head>
@@ -107,7 +107,7 @@
</span> </span>
</div> </div>
<div class="champ-saisie"> <div class="champ-saisie">
<label for="password">Mot de passe: </label> <label for="password" th:text="#{re}">Mot de passe: </label>
<div> <div>
<input type="password" th:field="*{password}" id="password" /> <input type="password" th:field="*{password}" id="password" />
</div> </div>
@@ -118,7 +118,7 @@
</span> </span>
</div> </div>
<div class="champ-saisie"> <div class="champ-saisie">
<label for="confirmPassword">Confirmation du mot de passe: </label> <label for="confirmPassword" th:text="#{}">Confirmation du mot de passe: </label>
<div> <div>
<input type="password" id="confirmPassword" /> <input type="password" id="confirmPassword" />
</div> </div>

View File

@@ -35,13 +35,15 @@
<a class="btn btn-primary" href="/login" role="button" style="background-color: #1B4463;">S'inscrire / Se connecter</a> <a class="btn btn-primary" href="/login" role="button" style="background-color: #1B4463;">S'inscrire / Se connecter</a>
</li> </li>
<li class="nav-item dropdown"> <li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-toggle="dropdown" aria-expanded="false"> <div class="dropdown">
<a class="nav-link dropdown-toggle" href="" id="navbarDropdownMenuLink" role="button" data-toggle="dropdown" aria-expanded="false">
<i class="fa-solid fa-earth-americas"></i> <i class="fa-solid fa-earth-americas"></i>
</a> </a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownMenuLink"> <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownMenuLink" role="menu">
<a class="dropdown-item" th:href="@{/change-language(lang='en')}">English</a> <a class="dropdown-item" th:href="@{/change-language(lang='en')}">English</a>
<a class="dropdown-item" th:href="@{/change-language(lang='fr')}">Français</a> <a class="dropdown-item" th:href="@{/change-language(lang='fr')}">Français</a>
</div> </div>
</div>
</li> </li>
</ul> </ul>
</div> </div>
@@ -98,6 +100,7 @@
© 2024 Copyright: © 2024 Copyright:
</div> </div>
</footer> </footer>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script src="/js/bootstrap/bootstrap.min.js"></script> <script src="/js/bootstrap/bootstrap.min.js"></script>
</body> </body>
</html> </html>

View File

@@ -1,28 +1,28 @@
<!DOCTYPE html> <!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> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
</head> </head>
<body> <body>
<div id="container-main"> <div id="container-main">
<h1>Nouvelle vente</h1> <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 --> <!-- Nom de l'article -->
<div> <div>
<label for="nom">Article:</label> <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> </div>
<!-- Description --> <!-- Description -->
<div> <div>
<label for="description">Description:</label> <label for="description">Description:</label>
<textarea id="description" th:field="*{article.desc}" required></textarea> <textarea id="description" th:field="*{desc}" required></textarea>
</div> </div>
<!-- Catégorie --> <!-- Catégorie -->
<div> <div>
<label for="categorie">Catégorie:</label> <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 --> <!-- 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> <option th:each="categorie : ${categories}" th:value="${categorie.id}" th:text="${categorie.libelle}"></option>
</select> </select>
@@ -31,40 +31,40 @@
<!-- Photo --> <!-- Photo -->
<div> <div>
<label for="photo">Photo de l'article:</label> <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> </div>
<!-- Mise à prix --> <!-- Mise à prix -->
<div> <div>
<label for="prix">Mise à prix:</label> <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> </div>
<!-- Date début enchère --> <!-- Date début enchère -->
<div> <div>
<label for="dateDebut">Date début enchère:</label> <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> </div>
<!-- Date fin enchère --> <!-- Date fin enchère -->
<div> <div>
<label for="dateFin">Date fin enchère:</label> <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> </div>
<!-- Lieu de retrait --> <!-- Lieu de retrait -->
<h4>Retrait</h4> <h4>Retrait</h4>
<div> <div>
<label for="rue">Rue:</label> <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>
<div> <div>
<label for="codePostal">Code postal:</label> <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>
<div> <div>
<label for="ville">Ville:</label> <label for="ville">Ville:</label>
<input type="text" id="ville" th:field="*{retrait.ville}" required> <input type="text" id="ville" name="ville" required>
</div> </div>
<!-- Bouton Enregistrer --> <!-- Bouton Enregistrer -->

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="fr" th:replace="~{modele-page :: layout('Votre profile',~{::link} , ~{::#container-main})}" xmlns:th="http://www.thymeleaf.org"> <html th:replace="~{modele-page :: layout('Votre profile',~{::link} , ~{::#container-main})}" xmlns:th="http://www.thymeleaf.org">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
</head> </head>