Proyectos de Subversion LeadersLinked - Services

Rev

Rev 283 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 283 Rev 345
Línea 1... Línea 1...
1
<?php
1
<?php
2
 
-
 
3
declare(strict_types=1);
2
declare(strict_types = 1);
4
 
-
 
5
namespace LeadersLinked\Form\Users;
3
namespace LeadersLinked\Form\Users;
Línea 6... Línea 4...
6
 
4
 
7
use Laminas\Form\Form;
5
use Laminas\Form\Form;
Línea 8... Línea 6...
8
use LeadersLinked\Model\UserType;
6
use LeadersLinked\Model\UserType;
9
 
7
 
-
 
8
class AddForm extends Form
10
class AddForm extends Form
9
{
11
{
10
 
12
    /**
11
    /**
13
     * 
12
     *
14
     * @param array $config
13
     * @param array $config
15
     */
14
     */
16
    public function __construct($adapter) 
-
 
17
    {
15
    public function __construct($adapter)
18
 
16
    {
19
        parent::__construct();
17
        parent::__construct();
20
        $this->setInputFilter(new AddFilter($adapter));
18
        $this->setInputFilter(new AddFilter($adapter));
21
        
19
 
22
        $this->add([
20
        $this->add([
23
            'name' => 'first_name',
21
            'name' => 'first_name',
24
            'type' => \Laminas\Form\Element\Text::class,
22
            'type' => \Laminas\Form\Element\Text::class,
25
             'attributes' => [
23
            'attributes' => [
26
                'maxlength' 	=> 64,
24
                'maxlength' => 64,
27
                'id' 			=> 'first_name',
25
                'id' => 'first_name'
28
            ]
26
            ]
29
         ]);
27
        ]);
30
         $this->add([
28
        $this->add([
31
            'name' => 'last_name',
29
            'name' => 'last_name',
32
            'type' => \Laminas\Form\Element\Text::class,
30
            'type' => \Laminas\Form\Element\Text::class,
33
            'attributes' => [
31
            'attributes' => [
34
                'maxlength' 	=> 64,
32
                'maxlength' => 64,
35
                'id' 			=> 'last_name',
33
                'id' => 'last_name'
36
            ]
34
            ]
37
        ]);
35
        ]);
38
         $this->add([
36
        $this->add([
39
            'name' => 'email',
37
            'name' => 'email',
40
            'type' => \Laminas\Form\Element\Text::class,
38
            'type' => \Laminas\Form\Element\Text::class,
41
            'attributes' => [
39
            'attributes' => [
-
 
40
                'maxlength' => 250,
-
 
41
                'id' => 'email'
-
 
42
            ]
-
 
43
        ]);
-
 
44
        $this->add([
-
 
45
            'name' => 'password',
-
 
46
            'type' => \Laminas\Form\Element\Text::class,
-
 
47
            'attributes' => [
-
 
48
                'maxlength' => 25,
-
 
49
                'id' => 'password'
-
 
50
            ]
-
 
51
        ]);
-
 
52
        $this->add([
-
 
53
            'name' => 'confirmation',
-
 
54
            'type' => \Laminas\Form\Element\Text::class,
-
 
55
            'attributes' => [
42
                'maxlength' 	=> 250,
56
                'maxlength' => 25,
43
                'id' 			=> 'email',
57
                'id' => 'confirmation'
44
            ]
-
 
45
        ]);
-
 
46
         $this->add([
-
 
47
             'name' => 'password',
-
 
48
             'type' => \Laminas\Form\Element\Text::class,
-
 
49
             'attributes' => [
-
 
50
                 'maxlength' 	=> 25,
-
 
51
                 'id' 			=> 'password',
-
 
52
             ]
-
 
53
         ]);
-
 
54
         $this->add([
-
 
55
             'name' => 'confirmation',
-
 
56
             'type' => \Laminas\Form\Element\Text::class,
-
 
57
             'attributes' => [
-
 
58
                 'maxlength' 	=> 25,
-
 
59
                 'id' 			=> 'confirmation',
-
 
60
             ]
58
            ]
61
         ]);
-
 
62
    }
-
 
63
 
59
        ]);
64
      
60
    }