Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 17002 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
17002 efrain 1
<?php
2
 
3
declare(strict_types=1);
4
 
17020 efrain 5
namespace LeadersLinked\Form\Job;
17002 efrain 6
 
7
use Laminas\Form\Form;
8
 
9
class JobLocationForm extends Form
10
{
11
    public function __construct()
12
    {
13
        parent::__construct();
14
        $this->setInputFilter(new JobLocationFilter());
15
 
16
        $this->add([
17
            'name' => 'location_search',
18
            'type' => \Laminas\Form\Element\Text::class,
19
            'attributes' => [
20
                'maxlength' 	=> 250,
21
                'id' 			=> 'location_search',
22
            ]
23
        ]);
24
 
25
 
26
        $this->add([
27
            'name' => 'formatted_address',
28
            'type' => \Laminas\Form\Element\Hidden::class,
29
            'attributes' => [
30
                'id'    => 'formatted_address',
31
            ]
32
        ]);
33
 
34
        $this->add([
35
            'name' => 'address1',
36
            'type' => \Laminas\Form\Element\Hidden::class,
37
            'attributes' => [
38
                'id'    => 'address1',
39
            ]
40
        ]);
41
 
42
        $this->add([
43
            'name' => 'address2',
44
            'type' => \Laminas\Form\Element\Hidden::class,
45
            'attributes' => [
46
                'id'    => 'address2',
47
            ]
48
        ]);
49
 
50
        $this->add([
51
            'name' => 'country',
52
            'type' => \Laminas\Form\Element\Hidden::class,
53
            'attributes' => [
54
                'id'    => 'country',
55
            ]
56
        ]);
57
 
58
        $this->add([
59
            'name' => 'state',
60
            'type' => \Laminas\Form\Element\Hidden::class,
61
            'attributes' => [
62
                'id'    => 'state',
63
            ]
64
        ]);
65
 
66
        $this->add([
67
            'name' => 'city1',
68
            'type' => \Laminas\Form\Element\Hidden::class,
69
            'attributes' => [
70
                'id'    => 'city1',
71
            ]
72
        ]);
73
 
74
        $this->add([
75
            'name' => 'city2',
76
            'type' => \Laminas\Form\Element\Hidden::class,
77
            'attributes' => [
78
                'id'    => 'city2',
79
            ]
80
        ]);
81
 
82
        $this->add([
83
            'name' => 'postal_code',
84
            'type' => \Laminas\Form\Element\Hidden::class,
85
            'attributes' => [
86
                'id'    => 'postal_code',
87
            ]
88
        ]);
89
 
90
        $this->add([
91
            'name' => 'latitude',
92
            'type' => \Laminas\Form\Element\Hidden::class,
93
            'attributes' => [
94
                'id'    => 'latitude',
95
            ]
96
        ]);
97
 
98
        $this->add([
99
            'name' => 'longitude',
100
            'type' => \Laminas\Form\Element\Hidden::class,
101
            'attributes' => [
102
                'id'    => 'longitude',
103
            ]
104
        ]);
105
 
106
 
107
 
108
        $this->add([
109
            'name' => 'is_main',
110
            'type' => \Laminas\Form\Element\Checkbox::class,
111
            'attributes' => [
112
                'id' 			=> 'is_main',
113
            ],
114
            'options' => [
115
                'use_hidden_element' => false,
116
                'unchecked_value' => \LeadersLinked\Model\CompanyLocation::IS_MAIN_NO,
117
                'checked_value'=>  \LeadersLinked\Model\CompanyLocation::IS_MAIN_YES,
118
            ]
119
        ]);
120
 
121
 
122
    }
123
 
124
}