Proyectos de Subversion LeadersLinked - Backend

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
17014 efrain 1
<?php
2
 
3
declare(strict_types=1);
4
 
5
namespace LeadersLinked\Form\Habit;
6
 
7
use Laminas\Form\Form;
8
 
9
 
10
 
11
class HabitContentAddForm extends Form
12
{
13
 
14
    public function __construct()
15
    {
16
        parent::__construct();
17
        $this->setInputFilter(new HabitContentAddFilter());
18
 
19
 
20
        $this->add([
21
            'name' => 'name',
22
            'type' => \Laminas\Form\Element\Text::class,
23
            'attributes' => [
24
                'maxlength' 	=> 100,
25
                'id' 			=> 'name',
26
            ]
27
        ]);
28
 
29
 
30
 
31
 
32
 
33
        $this->add([
34
            'name' => 'file',
35
            'type' => \Laminas\Form\Element\File::class,
36
            'attributes' => [
37
                'id' => 'file',
38
            ]
39
        ]);
40
 
41
 
42
        $this->add([
43
            'name' => 'status',
44
            'type' => \Laminas\Form\Element\Checkbox::class,
45
            'attributes' => [
46
                'id' 			=> 'status',
47
            ],
48
            'options' => [
49
                'use_hidden_element' => false,
50
                'unchecked_value' =>  \LeadersLinked\Model\HabitEmoji::STATUS_INACTIVE,
51
                'checked_value'=> \LeadersLinked\Model\HabitEmoji::STATUS_ACTIVE,
52
            ]
53
        ]);
54
 
55
        $this->add([
56
            'name' => 'order',
57
            'type' => \Laminas\Form\Element\Text::class,
58
            'attributes' => [
59
                'maxlength' 	=> 5,
60
                'id' 			=> 'order',
61
            ]
62
        ]);
63
 
64
 
65
 
66
 
67
    }
68
}