diff --git a/blog/html/ajouter_article.html b/blog/html/ajouter_article.html index 7db0417..1fc257d 100644 --- a/blog/html/ajouter_article.html +++ b/blog/html/ajouter_article.html @@ -69,7 +69,7 @@
- +
diff --git a/blog/js/ajouter_article.js b/blog/js/ajouter_article.js index db85da1..5da8a12 100644 --- a/blog/js/ajouter_article.js +++ b/blog/js/ajouter_article.js @@ -9,9 +9,7 @@ const publishedField = document.getElementById("articlePublished"); // Simulation BDD const titresExistants = ["décoration noel", "coupe de chien"]; -/* ========================= - DOM : messages -========================= */ + function showMessage(type, text) { messages.innerHTML = ""; @@ -22,17 +20,13 @@ function showMessage(type, text) { messages.appendChild(div); } -/* ========================= - Validation image -========================= */ + function imageValide(file) { if (!file) return true; return ["image/jpeg", "image/png"].includes(file.type); } -/* ========================= - Submit formulaire -========================= */ + form.addEventListener("submit", function (e) { e.preventDefault(); messages.innerHTML = ""; @@ -101,7 +95,7 @@ form.addEventListener("submit", function (e) { // Redirection setTimeout(() => { window.location.href = "../html/accueil_blog.html"; - }, 1000); + }, 1500); }); /* ========================= diff --git a/blog/js/ajouter_categorie.js b/blog/js/ajouter_categorie.js index b8e1038..bc5a4aa 100644 --- a/blog/js/ajouter_categorie.js +++ b/blog/js/ajouter_categorie.js @@ -48,5 +48,5 @@ form.addEventListener("submit", function (e) { // Redirection setTimeout(() => { window.location.href = "../html/accueil_blog.html"; - }, 1000); + }, 1500); });