Rev 310 | 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' => 'saturday_active',
],
'options' => [
'use_hidden_element' => false,
'unchecked_value' => '0',
'checked_value' => '1',
]
]);
$this->add([
'name' => 'monday_time',
'type' => \Laminas\Form\Element\Text::class,
'attributes' => [
'id' => 'monday_time',
'maxlength' => 5
]
]);
$this->add([
'name' => 'tuesday_time',
'type' => \Laminas\Form\Element\Text::class,
'attributes' => [
'id' => 'tuesday_time',
'maxlength' => 5
]
]);
$this->add([
'name' => 'wednesday_time',
'type' => \Laminas\Form\Element\Text::class,
'attributes' => [
'id' => 'wednesday_time',
'maxlength' => 5
]
]);
$this->add([
'name' => 'thursday_time',
'type' => \Laminas\Form\Element\Text::class,
'attributes' => [
'id' => 'thursday_time',
'maxlength' => 5
]
]);
$this->add([
'name' => 'friday_time',
'type' => \Laminas\Form\Element\Text::class,
'attributes' => [
'id' => 'friday_time',
'maxlength' => 5
]
]);
$this->add([
'name' => 'saturday_time',
'type' => \Laminas\Form\Element\Text::class,
'attributes' => [
'id' => 'saturday_time',
'maxlength' => 5
]
]);
$this->add([
'name' => 'sunday_time',
'type' => \Laminas\Form\Element\Text::class,
'attributes' => [
'id' => 'sunday_time',
'maxlength' => 5
]
]);
$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',
]
]);
}
}