02107cd0e82362434960e4b0efb4edd5dc2b38e9
[zf2.biz/galerie.git] / module / Galerie / src / Galerie / Form / GalerieForm.php
1 <?php
2
3 namespace Galerie\Form;
4
5 use Zend\Form\Form;
6
7 class GalerieForm extends Form
8 {
9
10     public function __construct($name=null)
11     {
12         parent::__construct('galerie');
13         $this->setAttribute('method', 'post');
14         $this->add(array(
15             'name' => 'id',
16             'attributes' => array(
17                 'type' => 'hidden',
18             ),
19         ));
20         $this->add(array(
21             'name' => 'name',
22             'attributes' => array(
23                 'type' => 'text',
24             ),
25             'options' => array(
26                 'label' => 'Name',
27             )
28         ));
29         $this->add(array(
30             'name' => 'description',
31             'attributes' => array(
32                 'type' => 'text',
33             ),
34             'options' => array(
35                 'label' => 'Description',
36             )
37         ));
38         $this->add(array(
39             'name' => 'submit',
40             'attributes' => array(
41                 'type' => 'submit',
42                 'value' => 'Valider',
43                 'id' => 'submit_galerie_form',
44             ),
45             'options' => array(
46                 'label' => 'Description',
47             )
48         ));
49     }
50
51 }