|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Cv\Form; |
|
4
|
|
|
|
|
5
|
|
|
use Cv\Entity\PreferredJob; |
|
6
|
|
|
use Zend\Form\Fieldset; |
|
7
|
|
|
use Core\Entity\Hydrator\EntityHydrator; |
|
8
|
|
|
|
|
9
|
|
|
class PreferredJobFieldset extends Fieldset |
|
10
|
|
|
{ |
|
11
|
|
|
/** |
|
12
|
|
|
* Type of Application Options |
|
13
|
|
|
* |
|
14
|
|
|
* @var array |
|
15
|
|
|
*/ |
|
16
|
|
|
public static $typoOfApplicationOptions = [ |
|
17
|
|
|
'' => '', // needed for jquery select2 to render the placeholder |
|
18
|
|
|
"temporary" => /*@translate*/ "Temporary", |
|
19
|
|
|
"permanent" => /*@translate*/ "Permanent", |
|
20
|
|
|
"contract"=> /*@translate*/ "Contracting", |
|
21
|
|
|
"freelance" => /*@translate*/ "Freelance", |
|
22
|
|
|
"internship" => /*@translate*/ "Internship" |
|
23
|
|
|
]; |
|
24
|
|
|
|
|
25
|
|
|
public static $willingnessToTravelOptions = [ |
|
26
|
|
|
'' => '', // needed for jquery select2 to render the placeholder |
|
27
|
|
|
"yes"=>/*@translate*/ "Yes", |
|
28
|
|
|
"conditioned" => /*@translate*/ "conditioned", |
|
29
|
|
|
"no"=>/*@translate*/ "No" |
|
30
|
|
|
]; |
|
31
|
|
|
|
|
32
|
|
|
public function init() |
|
33
|
|
|
{ |
|
34
|
|
|
$this->setName('preferredJob') |
|
35
|
|
|
->setHydrator(new EntityHydrator()) |
|
36
|
|
|
->setObject(new PreferredJob()) |
|
37
|
|
|
->setLabel('Desired Employment'); |
|
38
|
|
|
|
|
39
|
|
|
$this->add( |
|
40
|
|
|
array( |
|
41
|
|
|
'name' => 'typeOfApplication', |
|
42
|
|
|
'type' => 'select', |
|
43
|
|
|
'options' => [ |
|
44
|
|
|
'value_options' => self::$typoOfApplicationOptions, |
|
45
|
|
|
'label' => /*@translate */ 'desired type of work', |
|
46
|
|
|
'description' => /*@translate*/ 'Do you want to work permanently or temporary?', |
|
47
|
|
|
], |
|
48
|
|
|
'attributes' => array( |
|
49
|
|
|
'title' => /*@translate */ 'please describe your position', |
|
50
|
|
|
'description' => 'what kind of ', |
|
51
|
|
|
'data-placeholder' => /*@translate*/ 'please select', |
|
52
|
|
|
'data-allowclear' => 'false', |
|
53
|
|
|
'data-searchbox' => -1, |
|
54
|
|
|
'multiple' => true, |
|
55
|
|
|
'data-width' => '100%', |
|
56
|
|
|
), |
|
57
|
|
|
) |
|
58
|
|
|
); |
|
59
|
|
|
|
|
60
|
|
|
$this->add( |
|
61
|
|
|
array( |
|
62
|
|
|
'name' => 'desiredJob', |
|
63
|
|
|
'type' => 'Text', |
|
64
|
|
|
'options' => array( |
|
65
|
|
|
'label' => /*@translate */ 'desired job position', |
|
66
|
|
|
'description' => /*@translate*/ 'Enter the title of your desired job. Eg. "Software Developer" or "Customer Service Representative"', |
|
67
|
|
|
), |
|
68
|
|
|
'attributes' => array( |
|
69
|
|
|
'title' => /*@translate */ 'please describe your position', |
|
70
|
|
|
), |
|
71
|
|
|
) |
|
72
|
|
|
); |
|
73
|
|
|
|
|
74
|
|
|
$this->add( |
|
75
|
|
|
array( |
|
76
|
|
|
'name' => 'desiredLocations', |
|
77
|
|
|
'type' => 'Location', |
|
78
|
|
|
'options' => array( |
|
79
|
|
|
'label' => /*@translate */ 'desired job location', |
|
80
|
|
|
'description' => /*@translate*/ 'Where do you want to work?', |
|
81
|
|
|
), |
|
82
|
|
|
'attributes' => array( |
|
83
|
|
|
'title' => /*@translate */ 'please describe your position', |
|
84
|
|
|
), |
|
85
|
|
|
) |
|
86
|
|
|
); |
|
87
|
|
|
|
|
88
|
|
|
$this->add( |
|
89
|
|
|
array( |
|
90
|
|
|
'name' => 'willingnessToTravel', |
|
91
|
|
|
'type' => 'Select', |
|
92
|
|
|
'options' => array( |
|
93
|
|
|
'value_options' => self::$willingnessToTravelOptions, |
|
94
|
|
|
'label' => /*@translate*/ 'Willingness to travel', |
|
95
|
|
|
'description' => /*@translate*/ 'Enter your willingness to travel.', |
|
96
|
|
|
), |
|
97
|
|
|
'attributes' => array( |
|
98
|
|
|
'data-placeholder' => /*@translate*/ 'please select', |
|
99
|
|
|
'data-allowclear' => 'false', |
|
100
|
|
|
'data-searchbox' => -1, |
|
101
|
|
|
'data-width' => '100%' |
|
102
|
|
|
), |
|
103
|
|
|
) |
|
104
|
|
|
); |
|
105
|
|
|
|
|
106
|
|
|
$this->add( |
|
107
|
|
|
array( |
|
108
|
|
|
'name' => 'expectedSalary', |
|
109
|
|
|
'type' => 'Text', |
|
110
|
|
|
'options' => array( |
|
111
|
|
|
'label' => /*@translate */ 'expected Salary', |
|
112
|
|
|
'description' => /*@translate*/ 'What is your expected Salary?', |
|
113
|
|
|
), |
|
114
|
|
|
'attributes' => array( |
|
115
|
|
|
'title' => /*@translate */ 'please describe your position', |
|
116
|
|
|
), |
|
117
|
|
|
) |
|
118
|
|
|
); |
|
119
|
|
|
} |
|
120
|
|
|
} |
|
121
|
|
|
|