Formulaire : étape 1, rajout de l'objet formulaire
authorSébastien CHAZALLET <s.chazallet@gmail.com>
Thu, 15 Nov 2012 11:49:15 +0000 (12:49 +0100)
committerSébastien CHAZALLET <s.chazallet@gmail.com>
Thu, 15 Nov 2012 11:49:15 +0000 (12:49 +0100)
module/Galerie/src/Galerie/Form/GalerieForm.php [new file with mode: 0644]

diff --git a/module/Galerie/src/Galerie/Form/GalerieForm.php b/module/Galerie/src/Galerie/Form/GalerieForm.php
new file mode 100644 (file)
index 0000000..02107cd
--- /dev/null
@@ -0,0 +1,51 @@
+<?php
+
+namespace Galerie\Form;
+
+use Zend\Form\Form;
+
+class GalerieForm extends Form
+{
+
+    public function __construct($name=null)
+    {
+        parent::__construct('galerie');
+        $this->setAttribute('method', 'post');
+        $this->add(array(
+            'name' => 'id',
+            'attributes' => array(
+                'type' => 'hidden',
+            ),
+        ));
+        $this->add(array(
+            'name' => 'name',
+            'attributes' => array(
+                'type' => 'text',
+            ),
+            'options' => array(
+                'label' => 'Name',
+            )
+        ));
+        $this->add(array(
+            'name' => 'description',
+            'attributes' => array(
+                'type' => 'text',
+            ),
+            'options' => array(
+                'label' => 'Description',
+            )
+        ));
+        $this->add(array(
+            'name' => 'submit',
+            'attributes' => array(
+                'type' => 'submit',
+                'value' => 'Valider',
+                'id' => 'submit_galerie_form',
+            ),
+            'options' => array(
+                'label' => 'Description',
+            )
+        ));
+    }
+
+}