Rev 17007 | AutorÃa | Comparar con el anterior | Ultima modificación | Ver Log |
<?php
declare(strict_types=1);
namespace LeadersLinked\Form\Habit;
use Laminas\Form\Form;
use Laminas\Db\Adapter\AdapterInterface;
use Laminas\Log\LoggerInterface;
use LeadersLinked\Mapper\CompanySizeMapper;
use LeadersLinked\Mapper\IndustryMapper;
use LeadersLinked\Model\Feed;
class HabitSkillForm extends Form
{
public function __construct()
{
parent::__construct();
$this->setInputFilter(new HabitSkillFilter());
$this->add([
'name' => 'name',
'type' => \Laminas\Form\Element\Text::class,
'attributes' => [
'id' => 'name',
'maxlength' => 100
]
]);
$this->add([
'name' => 'description',
'type' => \Laminas\Form\Element\Textarea::class,
'attributes' => [
'id' => 'description',
'maxlength' => 512
]
]);
$this->add([
'name' => 'monday_active',
'type' => \Laminas\Form\Element\Checkbox::class,
'attributes' => [
'id' => 'monday_active',
],
'options' => [
'use_hidden_element' => false,
'unchecked_value' => '0',
'checked_value' => '1',
]
]);
$this->add([
'name' => 'tuesday_active',
'type' => \Laminas\Form\Element\Checkbox::class,
'attributes' => [
'id' => 'tuesday_active',
],
'options' => [
'use_hidden_element' => false,
'unchecked_value' => '0',
'checked_value' => '1',
]
]);
$this->add([
'name' => 'wednesday_active',
'type' => \Laminas\Form\Element\Checkbox::class,
'attributes' => [
'id' => 'wednesday_active',
],
'options' => [
'use_hidden_element' => false,
'unchecked_value' => '0',
'checked_value' => '1',
]
]);
$this->add([
'name' => 'thursday_active',
'type' => \Laminas\Form\Element\Checkbox::class,
'attributes' => [
'id' => 'thursday_active',
],
'options' => [
'use_hidden_element' => false,
'unchecked_value' => '0',
'checked_value' => '1',
]
]);
$this->add([
'name' => 'friday_active',
'type' => \Laminas\Form\Element\Checkbox::class,
'attributes' => [
'id' => 'friday_active',
],
'options' => [
'use_hidden_element' => false,
'unchecked_value' => '0',
'checked_value' => '1',
]
]);
$this->add([
'name' => 'saturday_active',
'type' => \Laminas\Form\Element\Checkbox::class,
'attributes' => [
'id' => 'saturday_active',
],
'options' => [
'use_hidden_element' => false,
'unchecked_value' => '0',
'checked_value' => '1',
]
]);
$this->add([
'name' => 'sunday_active',
'type' => \Laminas\Form\Element\Checkbox::class,
'attributes' => [
'id' => 'sunday_active',
],
'options' => [
'use_hidden_element' => false,
'unchecked_value' => '0',
'checked_value' => '1',
]
]);
$this->add([
'name' => 'monday_hour',
'type' => \Laminas\Form\Element\Select::class,
'options' => [
'value_options' => [
'00' => '00',
'01' => '01',
'02' => '02',
'03' => '03',
'04' => '04',
'05' => '05',
'06' => '06',
'07' => '07',
'08' => '08',
'09' => '09',
'10' => '10',
'11' => '11',
'12' => '12',
'13' => '13',
'14' => '14',
'15' => '15',
'16' => '16',
'17' => '17',
'18' => '18',
'19' => '19',
'20' => '20',
'21' => '21',
'22' => '22',
'23' => '23'
],
],
'attributes' => [
'id' => 'monday_hour',
]
]);
$this->add([
'name' => 'monday_minute',
'type' => \Laminas\Form\Element\Select::class,
'options' => [
'value_options' => [
'00' => '00',
'05' => '05',
'10' => '10',
'15' => '15',
'20' => '20',
'25' => '25',
'30' => '30',
'35' => '35',
'40' => '40',
'45' => '45',
'50' => '50',
'55' => '55'
],
],
'attributes' => [
'id' => 'monday_minute',
]
]);
$this->add([
'name' => 'tuesday_hour',
'type' => \Laminas\Form\Element\Select::class,
'options' => [
'value_options' => [
'00' => '00',
'01' => '01',
'02' => '02',
'03' => '03',
'04' => '04',
'05' => '05',
'06' => '06',
'07' => '07',
'08' => '08',
'09' => '09',
'10' => '10',
'11' => '11',
'12' => '12',
'13' => '13',
'14' => '14',
'15' => '15',
'16' => '16',
'17' => '17',
'18' => '18',
'19' => '19',
'20' => '20',
'21' => '21',
'22' => '22',
'23' => '23'
],
],
'attributes' => [
'id' => 'tuesday_hour',
]
]);
$this->add([
'name' => 'tuesday_minute',
'type' => \Laminas\Form\Element\Select::class,
'options' => [
'value_options' => [
'00' => '00',
'05' => '05',
'10' => '10',
'15' => '15',
'20' => '20',
'25' => '25',
'30' => '30',
'35' => '35',
'40' => '40',
'45' => '45',
'50' => '50',
'55' => '55'
],
],
'attributes' => [
'id' => 'tuesday_minute',
]
]);
$this->add([
'name' => 'wednesday_hour',
'type' => \Laminas\Form\Element\Select::class,
'options' => [
'value_options' => [
'00' => '00',
'01' => '01',
'02' => '02',
'03' => '03',
'04' => '04',
'05' => '05',
'06' => '06',
'07' => '07',
'08' => '08',
'09' => '09',
'10' => '10',
'11' => '11',
'12' => '12',
'13' => '13',
'14' => '14',
'15' => '15',
'16' => '16',
'17' => '17',
'18' => '18',
'19' => '19',
'20' => '20',
'21' => '21',
'22' => '22',
'23' => '23'
],
],
'attributes' => [
'id' => 'wednesday_hour',
]
]);
$this->add([
'name' => 'wednesday_minute',
'type' => \Laminas\Form\Element\Select::class,
'options' => [
'value_options' => [
'00' => '00',
'05' => '05',
'10' => '10',
'15' => '15',
'20' => '20',
'25' => '25',
'30' => '30',
'35' => '35',
'40' => '40',
'45' => '45',
'50' => '50',
'55' => '55'
],
],
'attributes' => [
'id' => 'wednesday_minute',
]
]);
$this->add([
'name' => 'thursday_hour',
'type' => \Laminas\Form\Element\Select::class,
'options' => [
'value_options' => [
'00' => '00',
'01' => '01',
'02' => '02',
'03' => '03',
'04' => '04',
'05' => '05',
'06' => '06',
'07' => '07',
'08' => '08',
'09' => '09',
'10' => '10',
'11' => '11',
'12' => '12',
'13' => '13',
'14' => '14',
'15' => '15',
'16' => '16',
'17' => '17',
'18' => '18',
'19' => '19',
'20' => '20',
'21' => '21',
'22' => '22',
'23' => '23'
],
],
'attributes' => [
'id' => 'thursday_hour',
]
]);
$this->add([
'name' => 'thursday_minute',
'type' => \Laminas\Form\Element\Select::class,
'options' => [
'value_options' => [
'00' => '00',
'05' => '05',
'10' => '10',
'15' => '15',
'20' => '20',
'25' => '25',
'30' => '30',
'35' => '35',
'40' => '40',
'45' => '45',
'50' => '50',
'55' => '55'
],
],
'attributes' => [
'id' => 'thursday_minute',
]
]);
$this->add([
'name' => 'friday_hour',
'type' => \Laminas\Form\Element\Select::class,
'options' => [
'value_options' => [
'00' => '00',
'01' => '01',
'02' => '02',
'03' => '03',
'04' => '04',
'05' => '05',
'06' => '06',
'07' => '07',
'08' => '08',
'09' => '09',
'10' => '10',
'11' => '11',
'12' => '12',
'13' => '13',
'14' => '14',
'15' => '15',
'16' => '16',
'17' => '17',
'18' => '18',
'19' => '19',
'20' => '20',
'21' => '21',
'22' => '22',
'23' => '23'
],
],
'attributes' => [
'id' => 'friday_hour',
]
]);
$this->add([
'name' => 'friday_minute',
'type' => \Laminas\Form\Element\Select::class,
'options' => [
'value_options' => [
'00' => '00',
'05' => '05',
'10' => '10',
'15' => '15',
'20' => '20',
'25' => '25',
'30' => '30',
'35' => '35',
'40' => '40',
'45' => '45',
'50' => '50',
'55' => '55'
],
],
'attributes' => [
'id' => 'friday_minute',
]
]);
$this->add([
'name' => 'saturday_hour',
'type' => \Laminas\Form\Element\Select::class,
'options' => [
'value_options' => [
'00' => '00',
'01' => '01',
'02' => '02',
'03' => '03',
'04' => '04',
'05' => '05',
'06' => '06',
'07' => '07',
'08' => '08',
'09' => '09',
'10' => '10',
'11' => '11',
'12' => '12',
'13' => '13',
'14' => '14',
'15' => '15',
'16' => '16',
'17' => '17',
'18' => '18',
'19' => '19',
'20' => '20',
'21' => '21',
'22' => '22',
'23' => '23'
],
],
'attributes' => [
'id' => 'saturday_hour',
]
]);
$this->add([
'name' => 'saturday_minute',
'type' => \Laminas\Form\Element\Select::class,
'options' => [
'value_options' => [
'00' => '00',
'05' => '05',
'10' => '10',
'15' => '15',
'20' => '20',
'25' => '25',
'30' => '30',
'35' => '35',
'40' => '40',
'45' => '45',
'50' => '50',
'55' => '55'
],
],
'attributes' => [
'id' => 'saturday_minute',
]
]);
$this->add([
'name' => 'sunday_hour',
'type' => \Laminas\Form\Element\Select::class,
'options' => [
'value_options' => [
'00' => '00',
'01' => '01',
'02' => '02',
'03' => '03',
'04' => '04',
'05' => '05',
'06' => '06',
'07' => '07',
'08' => '08',
'09' => '09',
'10' => '10',
'11' => '11',
'12' => '12',
'13' => '13',
'14' => '14',
'15' => '15',
'16' => '16',
'17' => '17',
'18' => '18',
'19' => '19',
'20' => '20',
'21' => '21',
'22' => '22',
'23' => '23'
],
],
'attributes' => [
'id' => 'sunday_hour',
]
]);
$this->add([
'name' => 'sunday_minute',
'type' => \Laminas\Form\Element\Select::class,
'options' => [
'value_options' => [
'00' => '00',
'05' => '05',
'10' => '10',
'15' => '15',
'20' => '20',
'25' => '25',
'30' => '30',
'35' => '35',
'40' => '40',
'45' => '45',
'50' => '50',
'55' => '55'
],
],
'attributes' => [
'id' => 'sunday_minute',
]
]);
$this->add([
'name' => 'quantitative_value',
'type' => \Laminas\Form\Element\Text::class,
'attributes' => [
'id' => 'quantitative_value',
'maxlength' => 5
]
]);
$this->add([
'name' => 'qualitative_description',
'type' => \Laminas\Form\Element\Text::class,
'attributes' => [
'id' => 'qualitative_description',
'maxlength' => 50
]
]);
$this->add([
'name' => 'notification_10min_before',
'type' => \Laminas\Form\Element\Checkbox::class,
'attributes' => [
'id' => 'notification_10min_before',
],
'options' => [
'use_hidden_element' => false,
'unchecked_value' => '0',
'checked_value' => '1',
]
]);
$this->add([
'name' => 'notification_30min_before',
'type' => \Laminas\Form\Element\Checkbox::class,
'attributes' => [
'id' => 'notification_30min_before',
],
'options' => [
'use_hidden_element' => false,
'unchecked_value' => '0',
'checked_value' => '1',
]
]);
$this->add([
'name' => 'intelligence',
'type' => \Laminas\Form\Element\Select::class,
'options' => [
'value_options' => [
'emotional' => 'LABEL_INTELLIGENCE_EMOTIONAL',
'physical' => 'LABEL_INTELLIGENCE_PHYSICAL',
'intellectual' => 'LABEL_INTELLIGENCE_INTELLECTUAL',
'consciousness' => 'LABEL_INTELLIGENCE_CONSCIOUSNESS'
],
],
'attributes' => [
'id' => 'intelligence',
]
]);
}
}