Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 6749 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 www 1
<?php
2
 
3
declare(strict_types=1);
4
 
5
namespace LeadersLinked\Form\Users;
6
 
7
use Laminas\Form\Form;
8
use LeadersLinked\Model\UserType;
9
 
10
class EditForm extends Form
11
{
12
    /**
13
     *
14
     * @param array $config
15
     */
16
    public function __construct($adapter)
17
    {
18
 
19
        parent::__construct();
20
        $this->setInputFilter(new EditFilter($adapter));
21
 
22
        $this->add([
23
            'name' => 'first_name',
24
            'type' => \Laminas\Form\Element\Text::class,
25
             'attributes' => [
26
                'maxlength' 	=> 64,
27
                'id' 			=> 'first_name',
28
            ]
29
         ]);
30
         $this->add([
31
            'name' => 'last_name',
32
            'type' => \Laminas\Form\Element\Text::class,
33
            'attributes' => [
34
                'maxlength' 	=> 64,
35
                'id' 			=> 'last_name',
36
            ]
37
        ]);
38
         $this->add([
39
            'name' => 'email',
40
            'type' => \Laminas\Form\Element\Text::class,
41
            'attributes' => [
42
                'maxlength' 	=> 64,
43
                'id' 			=> 'email',
44
            ]
45
        ]);
46
         $this->add([
47
             'name' => 'password',
48
             'type' => \Laminas\Form\Element\Text::class,
49
             'attributes' => [
50
                 'maxlength' 	=> 16,
51
                 'id' 			=> 'password',
52
             ]
53
         ]);
54
         $this->add([
55
             'name' => 'confirmation',
56
             'type' => \Laminas\Form\Element\Text::class,
57
             'attributes' => [
58
                 'maxlength' 	=> 16,
59
                 'id' 			=> 'confirmation',
60
             ]
61
         ]);
62
 
63
 
64
         $this->add([
65
             'name' => 'status',
66
             'type' => \Laminas\Form\Element\Checkbox::class,
67
             'attributes' => [
68
                 'id' 			=> 'status',
69
             ],
70
             'options' => [
6750 efrain 71
                 'use_hidden_element' => 'false',
1 www 72
                 'unchecked_value' => \LeadersLinked\Model\User::STATUS_INACTIVE,
73
                 'checked_value'=>  \LeadersLinked\Model\User::STATUS_ACTIVE
74
             ]
75
         ]);
76
 
77
    }
78
 
79
 
80
}