feat:avant apres+media queries+modale de suppression
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
@@ -8,14 +9,6 @@
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
|
||||
|
||||
<style>
|
||||
body {
|
||||
background: #f4f6f9;
|
||||
padding: 30px;
|
||||
}
|
||||
.container {
|
||||
max-width: 800px;
|
||||
margin-top: 100px;
|
||||
}
|
||||
.img-preview {
|
||||
max-width: 150px;
|
||||
border-radius: 8px;
|
||||
@@ -23,68 +16,83 @@
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
<body class="bg-light py-4 py-md-5">
|
||||
|
||||
<h2 class="mb-5 text-center">Ajouter une paire avant/après</h2>
|
||||
<div class="container" style="max-width: 800px;">
|
||||
|
||||
<!-- Message succès -->
|
||||
<div id="successMsg" class="alert alert-success d-none">
|
||||
Nouvelle paire ajoutée avec succès !
|
||||
<h1 class="mb-4 mb-md-5 text-center">Ajouter une paire avant/après</h1>
|
||||
|
||||
<!-- Message succès -->
|
||||
<div id="successMsg" class="alert alert-success d-none">
|
||||
Nouvelle paire ajoutée avec succès !
|
||||
</div>
|
||||
|
||||
<!-- Message erreur -->
|
||||
<div id="errorMsg" class="alert alert-danger d-none">
|
||||
Merci de remplir tous les champs obligatoires.
|
||||
</div>
|
||||
|
||||
<!-- Erreur : format invalide -->
|
||||
<div id="errorFormat" class="alert alert-danger d-none">
|
||||
Format d'image invalide. Formats acceptés : JPG, PNG, WEBP.
|
||||
</div>
|
||||
|
||||
<form id="addPairForm" class="mt-3">
|
||||
|
||||
<!-- Titre / label -->
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="pairTitle">Titre de la paire (obligatoire)</label>
|
||||
<input type="text" id="pairTitle" class="form-control" required>
|
||||
</div>
|
||||
|
||||
<!-- Type -->
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="pairType">Type (obligatoire)</label>
|
||||
<select id="pairType" class="form-select" required>
|
||||
<option value="">-- Choisir --</option>
|
||||
<option value="Chien">Chien</option>
|
||||
<option value="Chat">Chat</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Image AVANT -->
|
||||
<div class="mb-4">
|
||||
<label class="form-label" for="beforeImage">Image AVANT (obligatoire)</label>
|
||||
<input type="file" id="beforeImage" class="form-control" accept="image/*" required>
|
||||
|
||||
<img id="beforePreview" class="img-preview border mt-2" src="#" alt="image avant">
|
||||
</div>
|
||||
|
||||
<!-- Image APRÈS -->
|
||||
<div class="mb-4">
|
||||
<label class="form-label" for="afterImage">Image APRÈS (obligatoire)</label>
|
||||
<input type="file" id="afterImage" class="form-control" accept="image/*" required>
|
||||
|
||||
<img id="afterPreview" class="img-preview border mt-2" src="#" alt="image après">
|
||||
</div>
|
||||
|
||||
<!-- Boutons : empilés en mobile, côte à côte en md+ -->
|
||||
<div class="row mt-4 g-3">
|
||||
<div class="col-12 col-md-6">
|
||||
<a href="../liste_avant_apres/liste_avant_apres.html" class="btn btn-secondary w-100">
|
||||
Annuler
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-12 col-md-6">
|
||||
<button type="submit" class="btn btn-primary w-100">
|
||||
Ajouter
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- Message erreur -->
|
||||
<div id="errorMsg" class="alert alert-danger d-none">
|
||||
Merci de remplir tous les champs obligatoires.
|
||||
</div>
|
||||
|
||||
<form id="addPairForm">
|
||||
|
||||
<!-- Titre / label -->
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Titre de la paire *</label>
|
||||
<input type="text" id="pairTitle" class="form-control" required>
|
||||
</div>
|
||||
|
||||
<!-- Type -->
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Type *</label>
|
||||
<select id="pairType" class="form-select" required>
|
||||
<option value="">-- Choisir --</option>
|
||||
<option value="Chien">Chien</option>
|
||||
<option value="Chat">Chat</option>
|
||||
<option value="Autre">Autre</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Image AVANT -->
|
||||
<div class="mb-4">
|
||||
<label class="form-label">Image AVANT *</label>
|
||||
<input type="file" id="beforeImage" class="form-control" accept="image/*">
|
||||
|
||||
<img id="beforePreview" class="img-preview border mt-2">
|
||||
</div>
|
||||
|
||||
<!-- Image APRÈS -->
|
||||
<div class="mb-4">
|
||||
<label class="form-label">Image APRÈS *</label>
|
||||
<input type="file" id="afterImage" class="form-control" accept="image/*">
|
||||
|
||||
<img id="afterPreview" class="img-preview border mt-2">
|
||||
</div>
|
||||
|
||||
<!-- Boutons -->
|
||||
<div class="d-flex justify-content-between">
|
||||
<a href="../liste_avant_apres/liste_avant_apres.html" class="btn btn-secondary">Annuler</a>
|
||||
<button type="submit" class="btn btn-primary">Ajouter</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script src="ajouter_avant_apres.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="ajouter_avant_apres.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
@@ -1,60 +1,84 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Liste des paires avant/apres</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
|
||||
|
||||
|
||||
<style>
|
||||
body {
|
||||
background: #f4f6f9;
|
||||
padding: 30px;
|
||||
}
|
||||
.container {
|
||||
margin-top: 100px;
|
||||
}
|
||||
.action-btns button,
|
||||
.action-btns a {
|
||||
margin-right: 100px;
|
||||
}
|
||||
</style>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Liste des paires avant/après</title>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
<h2 class="mb-5 text-center">Liste des paires avant/apres</h2>
|
||||
|
||||
<!--Message succès-->
|
||||
<div id="succesDeleteMsg" class="alert alert-success d-none">Paire supprimée avec succès !</div>
|
||||
|
||||
<div class="d-flex justify-content-end mb-4">
|
||||
<a href="../ajouter_avant_apres/ajouter_avant_apres.html" class="btn btn-primary">Ajouter une paire</a>
|
||||
</div>
|
||||
|
||||
<body class="bg-light py-4 py-md-5">
|
||||
|
||||
<table class="table table-striped table-hover align-middle">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
<th>Titre paire</th>
|
||||
<th>Type</th>
|
||||
<th>Avant</th>
|
||||
<th>Apres</th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody id="prestationTableBody">
|
||||
<!--JS-->
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="container" style="max-width: 1000px;">
|
||||
<h1 class="mb-4 mb-md-5 text-center">Liste des paires avant/après</h1>
|
||||
|
||||
<!-- Message succès -->
|
||||
<div id="succesDeleteMsg" class="alert alert-success d-none">
|
||||
Paire supprimée avec succès !
|
||||
</div>
|
||||
|
||||
<script src="liste_avant_apres.js"></script>
|
||||
<div class="d-flex justify-content-end mb-4">
|
||||
<a href="../ajouter_avant_apres/ajouter_avant_apres.html" class="btn btn-primary">
|
||||
Ajouter une paire
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Table responsive -->
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover align-middle mb-0">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
<th>Titre paire</th>
|
||||
<th>Type</th>
|
||||
<th>Avant</th>
|
||||
<th>Après</th>
|
||||
<th class="text-center">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="prestationTableBody">
|
||||
<!-- JS -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
|
||||
<div class="modal-header">
|
||||
<h2 class="modal-title" id="deleteModalLabel">Confirmer la suppression</h2>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Fermer"></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
Voulez-vous vraiment supprimer cette paire avant/après ?
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Annuler</button>
|
||||
<button type="button" class="btn btn-danger" id="confirmDeleteBtn">Supprimer</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="liste_avant_apres.js"></script>
|
||||
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,5 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
@@ -7,24 +8,17 @@
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
|
||||
|
||||
<style>
|
||||
body {
|
||||
background: #f4f6f9;
|
||||
padding: 30px;
|
||||
}
|
||||
.container {
|
||||
margin-top: 100px;
|
||||
max-width: 800px;
|
||||
}
|
||||
.img-preview {
|
||||
max-width: 150px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
<h2 class="mb-5 text-center">Modifier une paire avant/après</h2>
|
||||
<body class="bg-light py-4 py-md-5">
|
||||
|
||||
<div class="container" style="max-width: 800px;">
|
||||
<h2 class="mb-4 mb-md-5 text-center">Modifier une paire avant/après</h2>
|
||||
|
||||
<!-- Messages -->
|
||||
<div id="successMsg" class="alert alert-success d-none">
|
||||
@@ -34,71 +28,71 @@
|
||||
Une erreur est survenue. Merci de vérifier le formulaire.
|
||||
</div>
|
||||
|
||||
<!-- Erreur : format invalide -->
|
||||
<div id="errorFormat" class="alert alert-danger d-none">
|
||||
Format d'image invalide. Formats acceptés : JPG, PNG, WEBP.
|
||||
</div>
|
||||
|
||||
<!-- Formulaire de modification -->
|
||||
<form id="editPairForm">
|
||||
<form id="editPairForm" class="mt-3">
|
||||
|
||||
<!-- ID caché -->
|
||||
<input type="hidden" id="pairId">
|
||||
|
||||
<!-- Titre / label -->
|
||||
<div class="mb-3">
|
||||
<label for="pairTitle" class="form-label">Titre / label de la paire *</label>
|
||||
<label for="pairTitle" class="form-label">Titre / label de la paire (obligatoire)</label>
|
||||
<input type="text" class="form-control" id="pairTitle" required>
|
||||
</div>
|
||||
|
||||
<!-- Type -->
|
||||
<div class="mb-3">
|
||||
<label for="pairType" class="form-label">Type</label>
|
||||
<select id="pairType" class="form-select">
|
||||
<label class="form-label" for="pairType">Type (obligatoire)</label>
|
||||
<select id="pairType" class="form-select" required>
|
||||
<option value="">-- Choisir --</option>
|
||||
<option value="Chien">Chien</option>
|
||||
<option value="Chat">Chat</option>
|
||||
<option value="Autre">Autre</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Image AVANT -->
|
||||
<div class="mb-4 row">
|
||||
<div class="col-md-6">
|
||||
<label class="form-label" for="beforeImage">Image AVANT</label>
|
||||
<input type="file" class="form-control" id="beforeImage" accept="image/*">
|
||||
<div class="form-text">
|
||||
Laisser vide pour conserver l'image actuelle.
|
||||
</div>
|
||||
<!-- Images AVANT / APRÈS sur une ligne en md+, empilées en mobile -->
|
||||
<div class="row gy-4 mb-4">
|
||||
<!-- Image AVANT -->
|
||||
<div class="col-12 col-md-6">
|
||||
<label class="form-label" for="beforeImage">Image AVANT (obligatoire)</label>
|
||||
<input type="file" class="form-control" id="beforeImage" accept="image/*" required>
|
||||
<!-- Aperçu éventuel -->
|
||||
<img id="beforePreview" class="img-preview mt-2 d-none" src="#" alt="Aperçu avant">
|
||||
</div>
|
||||
<div class="col-md-6 text-center">
|
||||
<p class="mb-1">Aperçu actuel AVANT</p>
|
||||
<img id="beforePreview" src="" alt="Image avant" class="img-preview border">
|
||||
|
||||
<!-- Image APRÈS -->
|
||||
<div class="col-12 col-md-6">
|
||||
<label class="form-label" for="afterImage">Image APRÈS (obligatoire)</label>
|
||||
<input type="file" class="form-control" id="afterImage" accept="image/*" required>
|
||||
<!-- Aperçu éventuel -->
|
||||
<img id="afterPreview" class="img-preview mt-2 d-none" src="#" alt="Aperçu après">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Image APRES -->
|
||||
<div class="mb-4 row">
|
||||
<div class="col-md-6">
|
||||
<label class="form-label" for="afterImage">Image APRÈS</label>
|
||||
<input type="file" class="form-control" id="afterImage" accept="image/*">
|
||||
<div class="form-text">
|
||||
Laisser vide pour conserver l'image actuelle.
|
||||
</div>
|
||||
<!-- Boutons : empilés en mobile, côte à côte en md+ -->
|
||||
<div class="row mt-4 g-3">
|
||||
<div class="col-12 col-md-6">
|
||||
<a href="../liste_avant_apres/liste_avant_apres.html" class="btn btn-secondary w-100">
|
||||
Annuler
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-6 text-center">
|
||||
<p class="mb-1">Aperçu actuel APRÈS</p>
|
||||
<img id="afterPreview" src="" alt="Image après" class="img-preview border">
|
||||
<div class="col-12 col-md-6">
|
||||
<button type="submit" class="btn btn-primary w-100">
|
||||
Enregistrer les modifications
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Boutons -->
|
||||
<div class="d-flex justify-content-between">
|
||||
<a href="../liste_avant_apres/liste_avant_apres.html" class="btn btn-secondary">
|
||||
Annuler
|
||||
</a>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
Enregistrer les modifications
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script src="modifier_avant_apres.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -8,46 +8,39 @@
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
|
||||
|
||||
<style>
|
||||
body {
|
||||
background: #f4f6f9;
|
||||
padding: 30px;
|
||||
}
|
||||
.container {
|
||||
max-width: 800px;
|
||||
margin-top: 100px;
|
||||
}
|
||||
.img-preview {
|
||||
max-width: 250px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<body class="bg-light py-4 py-md-5">
|
||||
|
||||
<div class="container">
|
||||
<div class="container" style="max-width: 800px;">
|
||||
|
||||
<h2 class="mb-5 text-center">Détails de la paire avant/après</h2>
|
||||
<h1 class="mb-4 mb-md-5 text-center">Détails de la paire avant/après</h1>
|
||||
|
||||
<!-- Message erreur -->
|
||||
<div id="errorMsg" class="alert alert-danger d-none">
|
||||
Impossible d'afficher cette paire.
|
||||
</div>
|
||||
|
||||
<div id="detailsSection">
|
||||
<div id="detailsSection" class="mt-3">
|
||||
|
||||
<!-- Titre -->
|
||||
<h4 id="pairTitle" class="text-center mb-4"></h4>
|
||||
<h2 id="pairTitle" class="text-center mb-4" aria-live="polite">Chargement...</h2>
|
||||
|
||||
<div class="d-flex justify-content-around align-items-center mb-4">
|
||||
|
||||
<div class="text-center">
|
||||
<!-- AVANT / APRÈS : empilés en mobile, côte à côte en md+ -->
|
||||
<div class="row justify-content-center align-items-start mb-4 g-4">
|
||||
|
||||
<div class="col-12 col-md-6 text-center">
|
||||
<p class="fw-bold">AVANT</p>
|
||||
<img id="beforePreview" class="img-preview border" src="">
|
||||
<img id="beforePreview" class="img-preview border img-fluid" src="#" alt="Photo avant">
|
||||
</div>
|
||||
|
||||
<div class="text-center">
|
||||
<div class="col-12 col-md-6 text-center">
|
||||
<p class="fw-bold">APRÈS</p>
|
||||
<img id="afterPreview" class="img-preview border" src="">
|
||||
<img id="afterPreview" class="img-preview border img-fluid" src="#" alt="Photo après" >
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -68,3 +61,4 @@
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user