From d91c2703689400a9356cc9b86e84c5e06f56b890 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Thu, 29 Aug 2024 18:13:11 +0200 Subject: [PATCH] Agenda focntion d'ajout add et non creation --- agenda/agenda.php | 14 ++++++-------- agenda/view/{creation/creation.css => add/add.css} | 0 agenda/view/{creation/creation.php => add/add.php} | 0 3 files changed, 6 insertions(+), 8 deletions(-) rename agenda/view/{creation/creation.css => add/add.css} (100%) rename agenda/view/{creation/creation.php => add/add.php} (100%) diff --git a/agenda/agenda.php b/agenda/agenda.php index dd4c0e9..4354d32 100644 --- a/agenda/agenda.php +++ b/agenda/agenda.php @@ -21,7 +21,7 @@ class agenda extends common { public static $actions = [ - 'creation' => self::GROUP_VISITOR, + 'add' => self::GROUP_VISITOR, 'edition' => self::GROUP_VISITOR, 'config' => self::GROUP_MODERATOR, 'categories' => self::GROUP_MODERATOR, @@ -520,7 +520,7 @@ class agenda extends common { /** * Création */ - public function creation() { + public function add() { // Soumission du formulaire if($this->isPost()) { @@ -574,7 +574,7 @@ class agenda extends common { else{ $this->addOutput([ 'notification' => 'La date de fin précède la date de début !', - 'view' => 'creation', + 'view' => 'add', 'state' => false ]); } @@ -656,7 +656,7 @@ class agenda extends common { $this->addOutput([ 'showBarEditButton' => true, 'showPageContent' => false, - 'view' => 'creation' + 'view' => 'add' ]); } } @@ -778,9 +778,7 @@ class agenda extends common { // Mise à jour des données de module $this->update(); - - var_dump($this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')); - + //Pour récupération des données ajax jquery date ou id $url = $_SERVER['REQUEST_URI']; if (strpos($url,'/da:') !== false){ @@ -788,7 +786,7 @@ class agenda extends common { $dateclic = $this->vue_debut($url,'/da:'); self::$datecreation = $dateclic; //Vers la création d'un évènement - $this->creation(); + $this->add(); } else{ if (strpos($url,'/id:') !== false){ diff --git a/agenda/view/creation/creation.css b/agenda/view/add/add.css similarity index 100% rename from agenda/view/creation/creation.css rename to agenda/view/add/add.css diff --git a/agenda/view/creation/creation.php b/agenda/view/add/add.php similarity index 100% rename from agenda/view/creation/creation.php rename to agenda/view/add/add.php