refonte arborescence + correction des chemins
This commit is contained in:
@@ -1,7 +0,0 @@
|
|||||||
function confirmerSuppression(titre) {
|
|
||||||
const confirmation = confirm(`Êtes-vous sûr de vouloir supprimer l'article "${titre}" ?`);
|
|
||||||
if (confirmation) {
|
|
||||||
alert(`L'article "${titre}" a été supprimé.`);
|
|
||||||
// Ici tu peux rediriger ou supprimer réellement
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
const form = document.getElementById('editArticleForm');
|
|
||||||
const imgField = document.getElementById('articleImage');
|
|
||||||
const titleField = document.getElementById('articleTitle');
|
|
||||||
const contentField = document.getElementById('articleContent');
|
|
||||||
const categoryField = document.getElementById('articleCategory');
|
|
||||||
const publishedField = document.getElementById('articlePublished');
|
|
||||||
|
|
||||||
const errorEmpty = document.getElementById('errorEmpty');
|
|
||||||
const errorImage = document.getElementById('errorImage');
|
|
||||||
const errorExists = document.getElementById('errorExists');
|
|
||||||
const successMsg = document.getElementById('successMsg');
|
|
||||||
|
|
||||||
// Simulation BDD pour vérifier doublons
|
|
||||||
const titresExistants = [
|
|
||||||
"article de test",
|
|
||||||
"nouveautés chiens",
|
|
||||||
"actualité du mois"
|
|
||||||
];
|
|
||||||
|
|
||||||
form.addEventListener('submit', function(e) {
|
|
||||||
e.preventDefault();
|
|
||||||
|
|
||||||
const titre = titleField.value.trim().toLowerCase();
|
|
||||||
const fichierImage = imgField.files[0];
|
|
||||||
|
|
||||||
// Reset messages
|
|
||||||
errorEmpty.classList.add('d-none');
|
|
||||||
errorImage.classList.add('d-none');
|
|
||||||
errorExists.classList.add('d-none');
|
|
||||||
successMsg.classList.add('d-none');
|
|
||||||
|
|
||||||
//Titre obligatoire
|
|
||||||
if (titre === "") {
|
|
||||||
errorEmpty.classList.remove('d-none');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Titre déjà existant ?
|
|
||||||
if (titresExistants.includes(titre)) {
|
|
||||||
errorExists.classList.remove('d-none');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Vérification image
|
|
||||||
if (fichierImage) {
|
|
||||||
const validFormats = ['image/jpeg', 'image/png', 'image/gif'];
|
|
||||||
if (!validFormats.includes(fichierImage.type)) {
|
|
||||||
errorImage.classList.remove('d-none');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Succès
|
|
||||||
successMsg.classList.remove('d-none');
|
|
||||||
|
|
||||||
console.log("Article modifié :", {
|
|
||||||
titre,
|
|
||||||
contenu: contentField.value,
|
|
||||||
categorie: categoryField.value,
|
|
||||||
publie: publishedField.checked,
|
|
||||||
image: fichierImage ? fichierImage.name : "Image inchangée"
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
@@ -6,6 +6,9 @@
|
|||||||
<title>Ajouter un article</title>
|
<title>Ajouter un article</title>
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
|
||||||
<script src="https://cdn.ckeditor.com/ckeditor5/39.0.1/classic/ckeditor.js"></script>
|
<script src="https://cdn.ckeditor.com/ckeditor5/39.0.1/classic/ckeditor.js"></script>
|
||||||
|
<script src="https://cdn.ckeditor.com/ckeditor5/39.0.1/classic/translations/fr.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -17,6 +20,9 @@
|
|||||||
max-width: 700px;
|
max-width: 700px;
|
||||||
margin: 40px auto;
|
margin: 40px auto;
|
||||||
}
|
}
|
||||||
|
.ck-editor__editable {
|
||||||
|
min-height: 350px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@@ -78,27 +84,39 @@
|
|||||||
<!--Publié-->
|
<!--Publié-->
|
||||||
<div class="form-check mb-3">
|
<div class="form-check mb-3">
|
||||||
<input class="form-check-input" type="checkbox" id="articlePublished">
|
<input class="form-check-input" type="checkbox" id="articlePublished">
|
||||||
<label class="form-check-label" for="articlePublished">Publié</label>
|
<label class="form-check-label" for="articlePublished">Publié (sera publié sur le blog)</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!--Boutons-->
|
<!--Boutons-->
|
||||||
<div class="d-flex gap-3 mt-4">
|
<div class="d-flex gap-3 mt-4">
|
||||||
<a href="../../../blog/categories/articles/liste_article.html" class="btn btn-secondary w-50">Annuler</a>
|
<a href="../html/liste_article.html" class="btn btn-secondary w-50">Annuler</a>
|
||||||
<button type="submit" class="btn btn-primary w-50">Ajouter</button>
|
<button type="submit" class="btn btn-primary w-50">Ajouter</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="ajouter_article.js"></script>
|
<script src="../js/ajouter_article.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
ClassicEditor
|
|
||||||
.create(document.querySelector('#articleContent'))
|
ClassicEditor
|
||||||
.catch(error => {
|
.create(document.querySelector('#articleContent'), {
|
||||||
console.error(error);
|
language: 'fr',
|
||||||
});
|
toolbar: [
|
||||||
|
'heading',
|
||||||
|
'bold', 'italic', 'underline',
|
||||||
|
'bulletedList', 'numberedList',
|
||||||
|
'undo', 'redo'
|
||||||
|
]
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="ajouter.js"></script>
|
<script src="../js/ajouter_categorie.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
@@ -33,22 +33,32 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<!--Exemple d'article-->
|
<tr>
|
||||||
<tr>
|
<td>Mon premier article</td>
|
||||||
<td>Mon premier article</td>
|
<td>Chien</td>
|
||||||
<td>Chien</td>
|
<td>Oui</td>
|
||||||
<td>Oui</td>
|
<td>
|
||||||
<td>
|
<a href="voir_article.html" class="btn btn-sm btn-outline-secondary">Voir</a>
|
||||||
<a href="voir_article.html" class="btn btn-sm btn-outline-secondary">Voir</a>
|
<a href="../html/modifier_article.html" class="btn btn-sm btn-outline-primary">Modifier</a>
|
||||||
<a href="modifier_article.html" class="btn btn-sm btn-outline-primary">Modifier</a>
|
<button class="btn btn-sm btn-outline-danger delete-btn">Supprimer</button>
|
||||||
<button class="btn btn-sm btn-outline-danger" onclick="confirmerSuppression('Mon premier article')">Supprimer</button>
|
</td>
|
||||||
</td>
|
</tr>
|
||||||
</tr>
|
|
||||||
</tbody>
|
<tr>
|
||||||
|
<td>Mon deuxième article</td>
|
||||||
|
<td>Chat</td>
|
||||||
|
<td>Oui</td>
|
||||||
|
<td>
|
||||||
|
<a href="voir_article.html" class="btn btn-sm btn-outline-secondary">Voir</a>
|
||||||
|
<a href="../html/modifier_article.html" class="btn btn-sm btn-outline-primary">Modifier</a>
|
||||||
|
<button class="btn btn-sm btn-outline-danger delete-btn">Supprimer</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script src="../js/liste_articles.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
<!-- Bouton ajouter -->
|
<!-- Bouton ajouter -->
|
||||||
<div class="d-flex justify-content-end mb-4">
|
<div class="d-flex justify-content-end mb-4">
|
||||||
<a href="../ajouter_categorie/ajouter_categorie.html" class="btn btn-primary">
|
<a href="../html/ajouter_categorie.html" class="btn btn-primary">
|
||||||
Ajouter une catégorie
|
Ajouter une catégorie
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="liste_categorie.js"></script>
|
<script src="../js/liste_categorie.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
@@ -6,6 +6,7 @@
|
|||||||
<title>Modifier un article</title>
|
<title>Modifier un article</title>
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
|
||||||
<script src="https://cdn.ckeditor.com/ckeditor5/39.0.1/classic/ckeditor.js"></script>
|
<script src="https://cdn.ckeditor.com/ckeditor5/39.0.1/classic/ckeditor.js"></script>
|
||||||
|
<script src="https://cdn.ckeditor.com/ckeditor5/39.0.1/classic/translations/fr.js"></script>
|
||||||
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@@ -17,9 +18,12 @@
|
|||||||
margin-top: 40px;
|
margin-top: 40px;
|
||||||
}
|
}
|
||||||
.preview-img {
|
.preview-img {
|
||||||
max-width: 15Opx;
|
max-width: 15px;
|
||||||
border-radius: 8px
|
border-radius: 8px
|
||||||
}
|
}
|
||||||
|
.ck-editor__editable {
|
||||||
|
min-height: 350px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
@@ -99,7 +103,7 @@
|
|||||||
|
|
||||||
<!--Boutons-->
|
<!--Boutons-->
|
||||||
<div class="d-flex gap-3 mt-4">
|
<div class="d-flex gap-3 mt-4">
|
||||||
<a href="../../../blog/categories/articles/liste_article.html" class="btn btn-secondary w-50">Annuler</a>
|
<a href="../html/liste_article.html" class="btn btn-secondary w-50">Annuler</a>
|
||||||
<button type="submit" class="btn btn-primary w-50">Enregistrer</button>
|
<button type="submit" class="btn btn-primary w-50">Enregistrer</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -109,37 +113,22 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
ClassicEditor
|
ClassicEditor
|
||||||
.create(document.querySelector('#articleContent'))
|
.create(document.querySelector('#articleContent'), {
|
||||||
.catch(error => {
|
language: 'fr',
|
||||||
console.error(error);
|
toolbar: [
|
||||||
});
|
'heading',
|
||||||
|
'bold', 'italic', 'underline',
|
||||||
|
'bulletedList', 'numberedList',
|
||||||
|
'undo', 'redo'
|
||||||
|
]
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script src="modifier_article.js"></script>
|
<script src="../js/modifier_article.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -49,6 +49,7 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script src="../js/modifier_categorie.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
const form = document.getElementById('addArticleForm');
|
const form = document.getElementById('ajouterArticleForm');
|
||||||
const imgField = document.getElementById('articleImage');
|
const imgField = document.getElementById('articleImage');
|
||||||
const titleField = document.getElementById('articleTitle');
|
const titleField = document.getElementById('articleTitle');
|
||||||
const contentField = document.getElementById('articleContent');
|
const contentField = document.getElementById('articleContent');
|
||||||
@@ -16,7 +16,7 @@ const titreExistants = ['décoration noel', 'coupe de chien'];
|
|||||||
form.addEventListener('submit', function(e) {
|
form.addEventListener('submit', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
const titre = titleField.value.trim() .toLowerCase();
|
const titre = titleField.value.trim().toLowerCase();
|
||||||
const fichierImage = imgField.files[0];
|
const fichierImage = imgField.files[0];
|
||||||
|
|
||||||
// Reset messages
|
// Reset messages
|
||||||
@@ -49,4 +49,11 @@ form.addEventListener('submit', function(e) {
|
|||||||
// Simuler enregistrement
|
// Simuler enregistrement
|
||||||
titreExistants.push(titre);
|
titreExistants.push(titre);
|
||||||
|
|
||||||
|
// Succès
|
||||||
|
successMsg.classList.remove('d-none');
|
||||||
|
|
||||||
|
// Redirection après 1 seconde
|
||||||
|
setTimeout(() => {
|
||||||
|
window.location.href = "../html/liste_article.html";
|
||||||
|
}, 1000);
|
||||||
});
|
});
|
||||||
@@ -32,12 +32,16 @@ form.addEventListener("submit", function (e) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Succès
|
// Succès
|
||||||
successMessage.classList.remove("d-none");
|
successMessage.classList.remove("d-none");
|
||||||
|
|
||||||
|
// Ajout d'une nouvelle catégorie
|
||||||
|
existingCategories.push(nom);
|
||||||
|
|
||||||
//Ajout d'une nouvelle catégorie en BDD
|
// Redirection après 1 seconde
|
||||||
existingCategories.push(nom);
|
setTimeout(() => {
|
||||||
|
window.location.href = "../html/liste_categorie.html";
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
14
blog/js/liste_articles.js
Normal file
14
blog/js/liste_articles.js
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
document.addEventListener("click", function (e) {
|
||||||
|
const btn = e.target.closest(".delete-btn");
|
||||||
|
if (!btn) return; // on a cliqué ailleurs
|
||||||
|
|
||||||
|
// On récupère la ligne de l'article
|
||||||
|
const row = btn.closest("tr");
|
||||||
|
const titre = row.querySelector("td").textContent.trim();
|
||||||
|
|
||||||
|
if (confirm(`Voulez-vous vraiment supprimer l'article : "${titre}" ?`)) {
|
||||||
|
row.remove(); // supprime la ligne
|
||||||
|
alert("Article supprimé !");
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -20,7 +20,7 @@ function afficherCategories() {
|
|||||||
<td>${cat.description || "-"}</td>
|
<td>${cat.description || "-"}</td>
|
||||||
|
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
<a href="../modifier_categorie/modifier_categorie.html?id=${cat.id}" class="btn btn-warning btn-sm">
|
<a href="../html/modifier_categorie.html?id=${cat.id}" class="btn btn-warning btn-sm">
|
||||||
Modifier
|
Modifier
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
60
blog/js/modifier_article.js
Normal file
60
blog/js/modifier_article.js
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
const form = document.getElementById("editArticleForm");
|
||||||
|
const imgField = document.getElementById("articleImage");
|
||||||
|
const titleField = document.getElementById("articleTitle");
|
||||||
|
const contentField = document.getElementById("articleContent");
|
||||||
|
const categoryField = document.getElementById("articleCategory");
|
||||||
|
const publishedField = document.getElementById("articlePublished");
|
||||||
|
|
||||||
|
const errorEmpty = document.getElementById("errorEmpty");
|
||||||
|
const errorImage = document.getElementById("errorImage");
|
||||||
|
const errorExists = document.getElementById("errorExists");
|
||||||
|
const successMsg = document.getElementById("successMsg");
|
||||||
|
|
||||||
|
// Simulation BDD pour vérifier doublons
|
||||||
|
const titresExistants = [
|
||||||
|
"article de test",
|
||||||
|
"nouveautés chiens",
|
||||||
|
"actualité du mois",
|
||||||
|
];
|
||||||
|
|
||||||
|
form.addEventListener("submit", function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
const titre = titleField.value.trim().toLowerCase();
|
||||||
|
const fichierImage = imgField.files[0];
|
||||||
|
|
||||||
|
// Reset messages
|
||||||
|
errorEmpty.classList.add("d-none");
|
||||||
|
errorImage.classList.add("d-none");
|
||||||
|
errorExists.classList.add("d-none");
|
||||||
|
successMsg.classList.add("d-none");
|
||||||
|
|
||||||
|
//Titre obligatoire
|
||||||
|
if (titre === "") {
|
||||||
|
errorEmpty.classList.remove("d-none");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Titre déjà existant ?
|
||||||
|
if (titresExistants.includes(titre)) {
|
||||||
|
errorExists.classList.remove("d-none");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Vérification image
|
||||||
|
if (fichierImage) {
|
||||||
|
const validFormats = ["image/jpeg", "image/png", "image/gif"];
|
||||||
|
if (!validFormats.includes(fichierImage.type)) {
|
||||||
|
errorImage.classList.remove("d-none");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Succès
|
||||||
|
successMsg.classList.remove("d-none");
|
||||||
|
|
||||||
|
// Redirection après succès
|
||||||
|
setTimeout(() => {
|
||||||
|
window.location.href = "../html/liste_article.html";
|
||||||
|
}, 1500);
|
||||||
|
});
|
||||||
@@ -21,6 +21,6 @@ form.addEventListener("submit", function (e) {
|
|||||||
|
|
||||||
// Redirection après succès
|
// Redirection après succès
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.location.href = "../../../blog/categories/liste_categorie/liste_categorie.html";
|
window.location.href = "../html/liste_categorie.html";
|
||||||
}, 1500);
|
}, 1500);
|
||||||
});
|
});
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
background: #f4f6f981;
|
background: #f4f6f981;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -27,10 +27,14 @@
|
|||||||
<div class="card shadow forgot-password-card">
|
<div class="card shadow forgot-password-card">
|
||||||
<div class="card-body p-4">
|
<div class="card-body p-4">
|
||||||
<h3 class="text-center mb-4">Mot de passe oublié</h3>
|
<h3 class="text-center mb-4">Mot de passe oublié</h3>
|
||||||
|
<p>
|
||||||
|
Nous avons besoin de votre adresse mail pour pouvoir réinitialiser
|
||||||
|
votre mot de passe.
|
||||||
|
</p>
|
||||||
<form>
|
<form>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label">Adresse e-mail</label>
|
<label class="form-label">Adresse e-mail</label>
|
||||||
|
|
||||||
<input
|
<input
|
||||||
type="email"
|
type="email"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
@@ -43,7 +47,9 @@
|
|||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div class="text-center mt-3">
|
<div class="text-center mt-3">
|
||||||
<a href="../page_de_connexion/page_de_connexion.html" class="text-decoration-none"
|
<a
|
||||||
|
href="../html/page_de_connexion.html"
|
||||||
|
class="text-decoration-none"
|
||||||
>Retour à la connexion</a
|
>Retour à la connexion</a
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
@@ -30,14 +30,15 @@
|
|||||||
|
|
||||||
<form>
|
<form>
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
|
|
||||||
<label class="form-label">Mot de passe</label>
|
<label class="form-label">Mot de passe</label>
|
||||||
<input
|
<input
|
||||||
type="password"
|
type="password"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
id="password"
|
id="password"
|
||||||
placeholder="••••••••"
|
|
||||||
/>
|
/>
|
||||||
<label for="showPassword">
|
<label for="showPassword" class="mt-2">
|
||||||
<input type="checkbox" id="showPassword" />
|
<input type="checkbox" id="showPassword" />
|
||||||
Voir le mot de passe
|
Voir le mot de passe
|
||||||
</label>
|
</label>
|
||||||
@@ -46,12 +47,12 @@
|
|||||||
<button class="btn btn-primary w-100">Se connecter</button>
|
<button class="btn btn-primary w-100">Se connecter</button>
|
||||||
|
|
||||||
<div class="text-center mt-3">
|
<div class="text-center mt-3">
|
||||||
<a href="../mot_de_passe_oublie/mot_de_passe_oublie.html" class="text-decoration-none">Mot de passe oublié ?</a>
|
<a href="../html/mot_de_passe_oublie.html" class="text-decoration-none">Mot de passe oublié ?</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script src="page_de_connexion.js"></script>
|
<script src="../js/page_de_connexion.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
id="password"
|
id="password"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
<small id="passwordIndicator" class="fw-bold"</small>
|
<small id="passwordIndicator" class="fw-bold"></small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
@@ -65,7 +65,7 @@
|
|||||||
id="confirmPassword"
|
id="confirmPassword"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
<label for="showPassword">
|
<label for="showPassword" class="mt-3">
|
||||||
<input type="checkbox" id="showPassword" />
|
<input type="checkbox" id="showPassword" />
|
||||||
Voir le mot de passe
|
Voir le mot de passe
|
||||||
</label>
|
</label>
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script src="reinitialisation_du_mot_de_passe.js"></script>
|
<script src="../js/reinitialisation_du_mot_de_passe.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -49,6 +49,12 @@ form.addEventListener('submit', function(e) {
|
|||||||
errorMsg.textContent = 'Les mots de passe ne correspondent pas.';
|
errorMsg.textContent = 'Les mots de passe ne correspondent pas.';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
successMsg.style.display = 'block';
|
||||||
|
|
||||||
|
// Redirection après 1 seconde
|
||||||
|
setTimeout(() => {
|
||||||
|
window.location.href = "../html/page_de_connexion.html";
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
Reference in New Issue
Block a user