Proyectos de Subversion LeadersLinked - Backend

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
8087 eleazar 1
<?php
2
 
3
declare(strict_types=1);
4
 
5
namespace LeadersLinked\Form;
6
 
7
use Laminas\Form\Form;
8
use Laminas\Db\Adapter\AdapterInterface;
9
use Laminas\Log\LoggerInterface;
10
use LeadersLinked\Model\CompanyPerformanceEvaluationTestSelf;
11
 
12
 
13
class PerformanceEvaluationEvaluationSelfForm extends Form
14
{
15
 
16
    /**
17
     *
18
     * @param AdapterInterface $adapter
19
     * @param int $company_id
20
     */
21
    public function __construct($adapter, $company_id)
22
    {
23
        parent::__construct();
24
        $this->setInputFilter(new PerformanceEvaluationEvaluationSelfFilter($adapter));
25
 
26
        $this->add([
27
            'name' => 'form_id',
28
            'type' => \Laminas\Form\Element\Select::class,
29
            'attributes' => [
30
                'id' => 'form_id',
31
            ]
32
        ]);
33
 
34
        $this->add([
35
            'name' => 'user_id',
36
            'type' => \Laminas\Form\Element\Text::class,
37
             'attributes' => [
38
                'id' 			=> 'user_id',
39
            ]
40
        ]);
41
 
42
        $this->add([
43
           'name' => 'first_name',
44
           'type' => \Laminas\Form\Element\Text::class,
45
            'attributes' => [
46
               'maxlength' 	=> 128,
47
               'id' 			=> 'first_name',
48
           ]
49
        ]);
50
 
51
        $this->add([
52
           'name' => 'last_name',
53
           'type' => \Laminas\Form\Element\Text::class,
54
            'attributes' => [
55
               'maxlength' 	=> 128,
56
               'id' 			=> 'last_name',
57
           ]
58
        ]);
59
 
60
        $this->add([
61
           'name' => 'email',
62
           'type' => \Laminas\Form\Element\Text::class,
63
            'attributes' => [
64
               'maxlength' 	=> 128,
65
               'id' 			=> 'email',
66
           ]
67
        ]);
68
 
69
        $this->add([
70
            'name' => 'content',
71
            'type' => \Laminas\Form\Element\Textarea::class,
72
            'attributes' => [
73
                'id'    => 'content',
74
            ]
75
        ]);
76
 
77
        $this->add([
78
            'name' => 'comment',
79
            'type' => \Laminas\Form\Element\Textarea::class,
80
             'attributes' => [
81
                'id' 			=> 'comment',
82
             ],
83
        ]);
84
 
85
        $this->add([
86
            'name' => 'points',
87
            'type' => \Laminas\Form\Element\Select::class,
88
            'options' => [
89
                'empty_option' => 'LABEL_EVALUATION',
90
                'value_options' => [
91
                    CompanyPerformanceEvaluationTestSelf::POINTS_0 => 'LABEL_ANOTHER',
92
                    CompanyPerformanceEvaluationTestSelf::POINTS_1 => '25%',
93
                    CompanyPerformanceEvaluationTestSelf::POINTS_2 => '50%',
94
                    CompanyPerformanceEvaluationTestSelf::POINTS_3 => '75%',
95
                    CompanyPerformanceEvaluationTestSelf::POINTS_4 => '100%',
96
 
97
                ],
98
            ],
99
            'attributes' => [
100
                'id' => 'points',
101
            ]
102
        ]);
103
 
104
        $this->add([
105
            'name' => 'supervisor_id',
106
            'type' => \Laminas\Form\Element\Select::class,
107
            'attributes' => [
108
                'id' => 'supervisor_id',
109
            ]
110
        ]);
111
    }
112
}