summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2025-08-02 17:03:42 +0200
committerpolo <ordipolo@gmx.fr>2025-08-02 17:03:42 +0200
commit9934a32f7e02c484d6b122c9af860ab1ca9b2dca (patch)
treef4f8d621a42104246375c0489e19e4673d726279 /public
parent20e1d288035a274b48f0d2d26f547ad15e99761d (diff)
downloadcms-9934a32f7e02c484d6b122c9af860ab1ca9b2dca.zip
réorganisation 2 requêtes "form": séparation routage et contrôleurs avec des fonctions
Diffstat (limited to 'public')
-rw-r--r--public/index.php11
-rw-r--r--public/js/calendar_admin.js2
2 files changed, 12 insertions, 1 deletions
diff --git a/public/index.php b/public/index.php
index d05e799..09af532 100644
--- a/public/index.php
+++ b/public/index.php
@@ -54,9 +54,18 @@ if(!empty($_GET['id']))
54} 54}
55 55
56/* -- contrôleurs qui traitent les POST (formulaires ou AJAX) -- */ 56/* -- contrôleurs qui traitent les POST (formulaires ou AJAX) -- */
57require '../src/controller/post.php'; 57require '../src/controller/post_router.php';
58
58 59
59/* -- affichage d'une page -- */ 60/* -- affichage d'une page -- */
61// mode modification d'une page activé
62if($_SESSION['admin'] && isset($_GET['page']) && isset($_GET['action']) && $_GET['action'] === 'modif_page'
63 && $_GET['page'] !== 'connexion' && $_GET['page'] !== 'article' && $_GET['page'] !== 'nouvelle_page' && $_GET['page'] !== 'menu_chemins')
64{
65 // les contrôles de la 2è ligne devraient utiliser un tableau
66 MainBuilder::$modif_mode = true;
67}
68
60// contrôleur accédant au modèle 69// contrôleur accédant au modèle
61$director = new Director($entityManager, true); 70$director = new Director($entityManager, true);
62$director->makeRootNode($id); 71$director->makeRootNode($id);
diff --git a/public/js/calendar_admin.js b/public/js/calendar_admin.js
index 90e2942..a2fb1ac 100644
--- a/public/js/calendar_admin.js
+++ b/public/js/calendar_admin.js
@@ -229,7 +229,9 @@ document.addEventListener('DOMContentLoaded', function(){
229 event_end = new Date(event_end).toISOString(); 229 event_end = new Date(event_end).toISOString();
230 } 230 }
231 231
232 // contrôle date/heure de fin après le début
232 if(event_start > event_end || (!event_all_day && event_start == event_end)){ 233 if(event_start > event_end || (!event_all_day && event_start == event_end)){
234 toastNotify("Erreur: la fin de l'évènement doit se situer après son début.");
233 return; 235 return;
234 } 236 }
235 237