From 7ce7c648cfe9ca14e37866d32c8b2390ccbc9e3a Mon Sep 17 00:00:00 2001 From: Matthieu Guffroy <mattgu74@gmail.com> Date: Tue, 17 Jun 2014 23:34:02 +0200 Subject: [PATCH] Avancement de la gestion du formulaire --- class/form.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/class/form.php b/class/form.php index b5449d7..c4061f6 100644 --- a/class/form.php +++ b/class/form.php @@ -9,7 +9,7 @@ class Form { $this->fields = $this->object->getFields(); // Update or Insert - if($this->object->{$this->object->primaryAttr}) { + if($this->object->{$this->object->primaryAttr}()) { $this->action = "Modifier"; } else { $this->action = "Ajouter"; @@ -19,7 +19,7 @@ class Form { if(isset($_POST["submitForm"])) { $post = true; // Apply validators - + // If all validators ok, commit } else { $post = false; -- GitLab