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
class HabitContentEditForm extends Form
11
{
12
 
13
    public function __construct()
14
    {
15
        parent::__construct();
16
        $this->setInputFilter(new HabitContentEditFilter());
17
 
18
 
19
        $this->add([
20
            'name' => 'name',
21
            'type' => \Laminas\Form\Element\Text::class,
22
            'attributes' => [
23
                'maxlength' 	=> 100,
24
                'id' 			=> 'name',
25
            ]
26
        ]);
27
 
28
 
29
 
30
        $this->add([
31
            'name' => 'status',
32
            'type' => \Laminas\Form\Element\Checkbox::class,
33
            'attributes' => [
34
                'id' 			=> 'status',
35
            ],
36
            'options' => [
37
                'use_hidden_element' => false,
38
                'unchecked_value' =>  \LeadersLinked\Model\HabitContent::STATUS_INACTIVE,
39
                'checked_value'=> \LeadersLinked\Model\HabitContent::STATUS_ACTIVE,
40
            ]
41
        ]);
42
 
43
 
44
 
45
 
46
 
47
        $this->add([
48
            'name' => 'file',
49
            'type' => \Laminas\Form\Element\File::class,
50
            'attributes' => [
51
                'id' => 'file',
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
}