Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev Autor Línea Nro. Línea
17007 efrain 1
<?php
2
 
3
declare(strict_types=1);
4
 
5
namespace LeadersLinked\Form\Habit;
6
 
7
 
8
use Laminas\Form\Form;
9
use Laminas\Db\Adapter\AdapterInterface;
10
use Laminas\Log\LoggerInterface;
11
use LeadersLinked\Mapper\CompanySizeMapper;
12
use LeadersLinked\Mapper\IndustryMapper;
13
use LeadersLinked\Model\Feed;
14
 
15
class HabitSkillForm extends Form
16
{
17
    public function __construct()
18
    {
19
        parent::__construct();
20
        $this->setInputFilter(new HabitSkillFilter());
21
 
22
        $this->add([
23
            'name' => 'name',
24
            'type' => \Laminas\Form\Element\Text::class,
25
            'attributes' => [
26
                'id'    => 'name',
27
                'maxlength' => 100
28
            ]
29
        ]);
30
 
31
        $this->add([
32
            'name' => 'description',
33
            'type' => \Laminas\Form\Element\Textarea::class,
34
            'attributes' => [
35
                'id'    => 'description',
36
                'maxlength' => 512
37
            ]
38
        ]);
39
 
40
        $this->add([
41
            'name' => 'monday_active',
42
            'type' => \Laminas\Form\Element\Checkbox::class,
43
            'attributes' => [
44
                'id' => 'monday_active',
45
            ],
46
            'options' => [
47
                'use_hidden_element' => false,
48
                'unchecked_value' => '0',
49
                'checked_value' => '1',
50
            ]
51
        ]);
52
 
53
        $this->add([
54
            'name' => 'tuesday_active',
55
            'type' => \Laminas\Form\Element\Checkbox::class,
56
            'attributes' => [
57
                'id' => 'tuesday_active',
58
            ],
59
            'options' => [
60
                'use_hidden_element' => false,
61
                'unchecked_value' => '0',
62
                'checked_value' => '1',
63
            ]
64
        ]);
65
 
66
        $this->add([
67
            'name' => 'wednesday_active',
68
            'type' => \Laminas\Form\Element\Checkbox::class,
69
            'attributes' => [
70
                'id' => 'wednesday_active',
71
            ],
72
            'options' => [
73
                'use_hidden_element' => false,
74
                'unchecked_value' => '0',
75
                'checked_value' => '1',
76
            ]
77
        ]);
78
 
79
        $this->add([
80
            'name' => 'thursday_active',
81
            'type' => \Laminas\Form\Element\Checkbox::class,
82
            'attributes' => [
83
                'id' => 'thursday_active',
84
            ],
85
            'options' => [
86
                'use_hidden_element' => false,
87
                'unchecked_value' => '0',
88
                'checked_value' => '1',
89
            ]
90
        ]);
91
 
92
        $this->add([
93
            'name' => 'friday_active',
94
            'type' => \Laminas\Form\Element\Checkbox::class,
95
            'attributes' => [
96
                'id' => 'friday_active',
97
            ],
98
            'options' => [
99
                'use_hidden_element' => false,
100
                'unchecked_value' => '0',
101
                'checked_value' => '1',
102
            ]
103
        ]);
104
 
105
        $this->add([
106
            'name' => 'saturday_active',
107
            'type' => \Laminas\Form\Element\Checkbox::class,
108
            'attributes' => [
109
                'id' => 'saturday_active',
110
            ],
111
            'options' => [
112
                'use_hidden_element' => false,
113
                'unchecked_value' => '0',
114
                'checked_value' => '1',
115
            ]
116
        ]);
117
 
118
        $this->add([
119
            'name' => 'sunday_active',
120
            'type' => \Laminas\Form\Element\Checkbox::class,
121
            'attributes' => [
17009 efrain 122
                'id' => 'sunday_active',
17007 efrain 123
            ],
124
            'options' => [
125
                'use_hidden_element' => false,
126
                'unchecked_value' => '0',
127
                'checked_value' => '1',
128
            ]
129
        ]);
130
 
131
 
132
        $this->add([
133
            'name' => 'monday_hour',
134
            'type' => \Laminas\Form\Element\Select::class,
135
            'options' => [
136
                'value_options' => [
137
                    '00' => '00',
138
                    '01' => '01',
139
                    '02' => '02',
140
                    '03' => '03',
141
                    '04' => '04',
142
                    '05' => '05',
143
                    '06' => '06',
144
                    '07' => '07',
145
                    '08' => '08',
146
                    '09' => '09',
147
                    '10' => '10',
148
                    '11' => '11',
149
                    '12' => '12',
150
                    '13' => '13',
151
                    '14' => '14',
152
                    '15' => '15',
153
                    '16' => '16',
154
                    '17' => '17',
155
                    '18' => '18',
156
                    '19' => '19',
157
                    '20' => '20',
158
                    '21' => '21',
159
                    '22' => '22',
160
                    '23' => '23'
161
                ],
162
            ],
163
            'attributes' => [
164
                'id' => 'monday_hour',
165
            ]
166
        ]);
167
 
168
        $this->add([
169
            'name' => 'monday_minute',
170
            'type' => \Laminas\Form\Element\Select::class,
171
            'options' => [
172
                'value_options' => [
173
                    '00' => '00',
174
                    '05' => '05',
175
                    '10' => '10',
176
                    '15' => '15',
177
                    '20' => '20',
178
                    '25' => '25',
179
                    '30' => '30',
180
                    '35' => '35',
181
                    '40' => '40',
182
                    '45' => '45',
183
                    '50' => '50',
184
                    '55' => '55'
185
                ],
186
            ],
187
            'attributes' => [
188
                'id' => 'monday_minute',
189
            ]
190
        ]);
191
 
192
        $this->add([
193
            'name' => 'tuesday_hour',
194
            'type' => \Laminas\Form\Element\Select::class,
195
            'options' => [
196
                'value_options' => [
197
                    '00' => '00',
198
                    '01' => '01',
199
                    '02' => '02',
200
                    '03' => '03',
201
                    '04' => '04',
202
                    '05' => '05',
203
                    '06' => '06',
204
                    '07' => '07',
205
                    '08' => '08',
206
                    '09' => '09',
207
                    '10' => '10',
208
                    '11' => '11',
209
                    '12' => '12',
210
                    '13' => '13',
211
                    '14' => '14',
212
                    '15' => '15',
213
                    '16' => '16',
214
                    '17' => '17',
215
                    '18' => '18',
216
                    '19' => '19',
217
                    '20' => '20',
218
                    '21' => '21',
219
                    '22' => '22',
220
                    '23' => '23'
221
                ],
222
            ],
223
            'attributes' => [
224
                'id' => 'tuesday_hour',
225
            ]
226
        ]);
227
 
228
        $this->add([
229
            'name' => 'tuesday_minute',
230
            'type' => \Laminas\Form\Element\Select::class,
231
            'options' => [
232
                'value_options' => [
233
                    '00' => '00',
234
                    '05' => '05',
235
                    '10' => '10',
236
                    '15' => '15',
237
                    '20' => '20',
238
                    '25' => '25',
239
                    '30' => '30',
240
                    '35' => '35',
241
                    '40' => '40',
242
                    '45' => '45',
243
                    '50' => '50',
244
                    '55' => '55'
245
                ],
246
            ],
247
            'attributes' => [
248
                'id' => 'tuesday_minute',
249
            ]
250
        ]);
251
 
252
        $this->add([
253
            'name' => 'wednesday_hour',
254
            'type' => \Laminas\Form\Element\Select::class,
255
            'options' => [
256
                'value_options' => [
257
                    '00' => '00',
258
                    '01' => '01',
259
                    '02' => '02',
260
                    '03' => '03',
261
                    '04' => '04',
262
                    '05' => '05',
263
                    '06' => '06',
264
                    '07' => '07',
265
                    '08' => '08',
266
                    '09' => '09',
267
                    '10' => '10',
268
                    '11' => '11',
269
                    '12' => '12',
270
                    '13' => '13',
271
                    '14' => '14',
272
                    '15' => '15',
273
                    '16' => '16',
274
                    '17' => '17',
275
                    '18' => '18',
276
                    '19' => '19',
277
                    '20' => '20',
278
                    '21' => '21',
279
                    '22' => '22',
280
                    '23' => '23'
281
                ],
282
            ],
283
            'attributes' => [
284
                'id' => 'wednesday_hour',
285
            ]
286
        ]);
287
 
288
        $this->add([
289
            'name' => 'wednesday_minute',
290
            'type' => \Laminas\Form\Element\Select::class,
291
            'options' => [
292
                'value_options' => [
293
                    '00' => '00',
294
                    '05' => '05',
295
                    '10' => '10',
296
                    '15' => '15',
297
                    '20' => '20',
298
                    '25' => '25',
299
                    '30' => '30',
300
                    '35' => '35',
301
                    '40' => '40',
302
                    '45' => '45',
303
                    '50' => '50',
304
                    '55' => '55'
305
                ],
306
            ],
307
            'attributes' => [
308
                'id' => 'wednesday_minute',
309
            ]
310
        ]);
311
 
312
        $this->add([
313
            'name' => 'thursday_hour',
314
            'type' => \Laminas\Form\Element\Select::class,
315
            'options' => [
316
                'value_options' => [
317
                    '00' => '00',
318
                    '01' => '01',
319
                    '02' => '02',
320
                    '03' => '03',
321
                    '04' => '04',
322
                    '05' => '05',
323
                    '06' => '06',
324
                    '07' => '07',
325
                    '08' => '08',
326
                    '09' => '09',
327
                    '10' => '10',
328
                    '11' => '11',
329
                    '12' => '12',
330
                    '13' => '13',
331
                    '14' => '14',
332
                    '15' => '15',
333
                    '16' => '16',
334
                    '17' => '17',
335
                    '18' => '18',
336
                    '19' => '19',
337
                    '20' => '20',
338
                    '21' => '21',
339
                    '22' => '22',
340
                    '23' => '23'
341
                ],
342
            ],
343
            'attributes' => [
344
                'id' => 'thursday_hour',
345
            ]
346
        ]);
347
 
348
        $this->add([
349
            'name' => 'thursday_minute',
350
            'type' => \Laminas\Form\Element\Select::class,
351
            'options' => [
352
                'value_options' => [
353
                    '00' => '00',
354
                    '05' => '05',
355
                    '10' => '10',
356
                    '15' => '15',
357
                    '20' => '20',
358
                    '25' => '25',
359
                    '30' => '30',
360
                    '35' => '35',
361
                    '40' => '40',
362
                    '45' => '45',
363
                    '50' => '50',
364
                    '55' => '55'
365
                ],
366
            ],
367
            'attributes' => [
368
                'id' => 'thursday_minute',
369
            ]
370
        ]);
371
 
372
        $this->add([
373
            'name' => 'friday_hour',
374
            'type' => \Laminas\Form\Element\Select::class,
375
            'options' => [
376
                'value_options' => [
377
                    '00' => '00',
378
                    '01' => '01',
379
                    '02' => '02',
380
                    '03' => '03',
381
                    '04' => '04',
382
                    '05' => '05',
383
                    '06' => '06',
384
                    '07' => '07',
385
                    '08' => '08',
386
                    '09' => '09',
387
                    '10' => '10',
388
                    '11' => '11',
389
                    '12' => '12',
390
                    '13' => '13',
391
                    '14' => '14',
392
                    '15' => '15',
393
                    '16' => '16',
394
                    '17' => '17',
395
                    '18' => '18',
396
                    '19' => '19',
397
                    '20' => '20',
398
                    '21' => '21',
399
                    '22' => '22',
400
                    '23' => '23'
401
                ],
402
            ],
403
            'attributes' => [
404
                'id' => 'friday_hour',
405
            ]
406
        ]);
407
 
408
        $this->add([
409
            'name' => 'friday_minute',
410
            'type' => \Laminas\Form\Element\Select::class,
411
            'options' => [
412
                'value_options' => [
413
                    '00' => '00',
414
                    '05' => '05',
415
                    '10' => '10',
416
                    '15' => '15',
417
                    '20' => '20',
418
                    '25' => '25',
419
                    '30' => '30',
420
                    '35' => '35',
421
                    '40' => '40',
422
                    '45' => '45',
423
                    '50' => '50',
424
                    '55' => '55'
425
                ],
426
            ],
427
            'attributes' => [
428
                'id' => 'friday_minute',
429
            ]
430
        ]);
431
 
432
        $this->add([
433
            'name' => 'saturday_hour',
434
            'type' => \Laminas\Form\Element\Select::class,
435
            'options' => [
436
                'value_options' => [
437
                    '00' => '00',
438
                    '01' => '01',
439
                    '02' => '02',
440
                    '03' => '03',
441
                    '04' => '04',
442
                    '05' => '05',
443
                    '06' => '06',
444
                    '07' => '07',
445
                    '08' => '08',
446
                    '09' => '09',
447
                    '10' => '10',
448
                    '11' => '11',
449
                    '12' => '12',
450
                    '13' => '13',
451
                    '14' => '14',
452
                    '15' => '15',
453
                    '16' => '16',
454
                    '17' => '17',
455
                    '18' => '18',
456
                    '19' => '19',
457
                    '20' => '20',
458
                    '21' => '21',
459
                    '22' => '22',
460
                    '23' => '23'
461
                ],
462
            ],
463
            'attributes' => [
464
                'id' => 'saturday_hour',
465
            ]
466
        ]);
467
 
468
        $this->add([
469
            'name' => 'saturday_minute',
470
            'type' => \Laminas\Form\Element\Select::class,
471
            'options' => [
472
                'value_options' => [
473
                    '00' => '00',
474
                    '05' => '05',
475
                    '10' => '10',
476
                    '15' => '15',
477
                    '20' => '20',
478
                    '25' => '25',
479
                    '30' => '30',
480
                    '35' => '35',
481
                    '40' => '40',
482
                    '45' => '45',
483
                    '50' => '50',
484
                    '55' => '55'
485
                ],
486
            ],
487
            'attributes' => [
488
                'id' => 'saturday_minute',
489
            ]
490
        ]);
491
 
492
 
493
        $this->add([
494
            'name' => 'sunday_hour',
495
            'type' => \Laminas\Form\Element\Select::class,
496
            'options' => [
497
                'value_options' => [
498
                    '00' => '00',
499
                    '01' => '01',
500
                    '02' => '02',
501
                    '03' => '03',
502
                    '04' => '04',
503
                    '05' => '05',
504
                    '06' => '06',
505
                    '07' => '07',
506
                    '08' => '08',
507
                    '09' => '09',
508
                    '10' => '10',
509
                    '11' => '11',
510
                    '12' => '12',
511
                    '13' => '13',
512
                    '14' => '14',
513
                    '15' => '15',
514
                    '16' => '16',
515
                    '17' => '17',
516
                    '18' => '18',
517
                    '19' => '19',
518
                    '20' => '20',
519
                    '21' => '21',
520
                    '22' => '22',
521
                    '23' => '23'
522
                ],
523
            ],
524
            'attributes' => [
525
                'id' => 'sunday_hour',
526
            ]
527
        ]);
528
 
529
        $this->add([
530
            'name' => 'sunday_minute',
531
            'type' => \Laminas\Form\Element\Select::class,
532
            'options' => [
533
                'value_options' => [
534
                    '00' => '00',
535
                    '05' => '05',
536
                    '10' => '10',
537
                    '15' => '15',
538
                    '20' => '20',
539
                    '25' => '25',
540
                    '30' => '30',
541
                    '35' => '35',
542
                    '40' => '40',
543
                    '45' => '45',
544
                    '50' => '50',
545
                    '55' => '55'
546
                ],
547
            ],
548
            'attributes' => [
549
                'id' => 'sunday_minute',
550
            ]
551
        ]);
552
 
553
 
554
 
555
        $this->add([
556
            'name' => 'quantitative_value',
557
            'type' => \Laminas\Form\Element\Text::class,
558
            'attributes' => [
559
                'id'    => 'quantitative_value',
560
                'maxlength' => 5
561
            ]
562
        ]);
563
 
564
 
565
 
566
        $this->add([
567
            'name' => 'qualitative_description',
568
            'type' => \Laminas\Form\Element\Text::class,
569
            'attributes' => [
570
                'id'    => 'qualitative_description',
571
                'maxlength' => 50
572
            ]
573
        ]);
574
 
575
        $this->add([
576
            'name' => 'notification_10min_before',
577
            'type' => \Laminas\Form\Element\Checkbox::class,
578
            'attributes' => [
579
                'id' => 'notification_10min_before',
580
            ],
581
            'options' => [
582
                'use_hidden_element' => false,
583
                'unchecked_value' => '0',
584
                'checked_value' => '1',
585
            ]
586
        ]);
587
 
588
        $this->add([
589
            'name' => 'notification_30min_before',
590
            'type' => \Laminas\Form\Element\Checkbox::class,
591
            'attributes' => [
592
                'id' => 'notification_30min_before',
593
            ],
594
            'options' => [
595
                'use_hidden_element' => false,
596
                'unchecked_value' => '0',
597
                'checked_value' => '1',
598
            ]
599
        ]);
600
 
601
        $this->add([
602
            'name' => 'intelligence',
603
            'type' => \Laminas\Form\Element\Select::class,
604
            'options' => [
605
                'value_options' => [
606
                    'emotional' => 'LABEL_INTELLIGENCE_EMOTIONAL',
607
                    'physical' => 'LABEL_INTELLIGENCE_PHYSICAL',
608
                    'intellectual' => 'LABEL_INTELLIGENCE_INTELLECTUAL',
609
                    'consciousness' => 'LABEL_INTELLIGENCE_CONSCIOUSNESS'
610
 
611
 
612
 
613
                ],
614
            ],
615
            'attributes' => [
616
                'id' => 'intelligence',
617
            ]
618
        ]);
619
 
620
 
621
 
622
 
623
    }
624
}