Proyectos de Subversion LeadersLinked - Backend

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
17002 efrain 1
<?php
2
 
3
declare(strict_types=1);
4
 
5
namespace LeadersLinked\Form\Microlearning;
6
 
7
use Laminas\Form\Form;
8
use Laminas\Db\Adapter\AdapterInterface;
9
use Laminas\Log\LoggerInterface;
10
use LeadersLinked\Mapper\CompanySizeMapper;
11
use LeadersLinked\Mapper\IndustryMapper;
12
use LeadersLinked\Model\SelfEvaluationForm;
13
use LeadersLinked\Model\MicrolearningQuiz;
14
 
15
 
16
class QuizCreateOrEditForm extends Form
17
{
18
 
19
    public function __construct()
20
    {
21
        parent::__construct();
22
        $this->setInputFilter(new QuizCreateOrEditFilter());
23
 
24
        $this->add([
25
            'name' => 'name',
26
            'type' => \Laminas\Form\Element\Text::class,
27
             'attributes' => [
28
                'maxlength' 	=> 128,
29
                'id' 			=> 'name',
30
            ]
31
         ]);
32
 
33
       /*
34
        $this->add([
35
            'name' => 'text',
36
            'type' => \Laminas\Form\Element\Textarea::class,
37
            'attributes' => [
38
                'id'    => 'text',
39
            ]
40
        ]);
41
        */
42
 
43
 
44
 
45
        $this->add([
46
            'name' => 'points',
47
            'type' => \Laminas\Form\Element\Text::class,
48
            'attributes' => [
49
                'maxlength' 	=> 3,
50
                'id' 			=> 'points',
51
            ]
52
        ]);
53
 
54
        $this->add([
55
            'name' => 'minimum_points_required',
56
            'type' => \Laminas\Form\Element\Text::class,
57
            'attributes' => [
58
                'maxlength' 	=> 3,
59
                'id' 			=> 'minimum_points_required',
60
            ]
61
        ]);
62
 
63
        $this->add([
64
            'name' => 'status',
65
            'type' => \Laminas\Form\Element\Select::class,
66
            'options' => [
67
                'empty_option' => 'LABEL_STATUS',
68
                'value_options' => [
69
                    MicrolearningQuiz::STATUS_ACTIVE => 'LABEL_ACTIVE',
70
                    MicrolearningQuiz::STATUS_INACTIVE => 'LABEL_INACTIVE',
71
                ],
72
            ],
73
            'attributes' => [
74
                'id' => 'status',
75
            ]
76
        ]);
77
 
78
        $this->add([
79
            'name' => 'max_time',
80
            'type' => \Laminas\Form\Element\Text::class,
81
            'attributes' => [
82
                'maxlength' 	=> 2,
83
                'id' 			=> 'max_time',
84
            ]
85
        ]);
86
 
87
        /*
88
        $this->add([
89
            'name' => 'failed',
90
            'type' => \Laminas\Form\Element\Textarea::class,
91
            'attributes' => [
92
                'id'    => 'failed',
93
            ]
94
        ]);
95
        */
96
 
97
 
98
    }
99
 
100
 
101
 
102
}