Rev 2979 | AutorÃa | Ultima modificación | Ver Log |
<?phpdeclare(strict_types=1);namespace LeadersLinked\Form;use Laminas\Form\Form;use Laminas\Db\Adapter\AdapterInterface;use Laminas\Log\LoggerInterface;use LeadersLinked\Model\PlanningObjectivesAndGoalsTask;use Laminas\Form\Element;class PlanningObjectivesAndGoalsTaskForm extends Form{public function __construct(){parent::__construct();$this->setInputFilter(new PlanningObjectivesAndGoalsTaskFilter());$this->add(['name' => 'title','type' => \Laminas\Form\Element\Text::class,'attributes' => ['maxlength' => 254,'id' => 'title',]]);$this->add(['name' => 'description','type' => \Laminas\Form\Element\Text::class,'attributes' => ['maxlength' => 254,'id' => 'description',]]);$this->add(['name' => 'how','type' => \Laminas\Form\Element\Text::class,'attributes' => ['maxlength' => 254,'id' => 'how',]]);$this->add(['name' => 'place','type' => \Laminas\Form\Element\Text::class,'attributes' => ['maxlength' => 254,'id' => 'place',]]);$this->add(['name' => 'who','type' => \Laminas\Form\Element\Text::class,'attributes' => ['maxlength' => 254,'id' => 'who',]]);$this->add(['name' => 'time','type' => \Laminas\Form\Element\Number::class,'attributes' => ['min' => '0','step' => '1','id' => 'time',]]);$this->add(['name' => 'date','type' => Element\Date::class,'attributes' => ['maxlength' => 15,'id' => 'date',]]);$this->add(['name' => 'detour','type' => \Laminas\Form\Element\Text::class,'attributes' => ['maxlength' => 254,'id' => 'detour',]]);$this->add(['name' => 'evaluation','type' => \Laminas\Form\Element\Text::class,'attributes' => ['maxlength' => 254,'id' => 'evaluation',]]);$this->add(['type' => Element\Range::class,'name' => 'indicator','attributes' => ['min'=> 1,'max' => 100, // default maximum is 100'id' => 'indicator',],]);$this->add(['name' => 'cost','type' => \Laminas\Form\Element\Number::class,'attributes' => ['min' => '0','step' => '1','id' => 'cost',]]);$this->add(['type' => Element\Select::class,'name' => 'priority','options' => ['empty_option' => 'LABEL_SELECT','value_options' =>['i' => 'LABEL_IMPORTANT','ni' => 'LABEL_NOT_IMPORTANT',],],'attributes'=> ['required'=> true,'class' => 'Custom-select','id' => 'priority',]]);$this->add(['type' => Element\Select::class,'name' => 'urgent','options' => ['empty_option' => 'LABEL_SELECT','value_options' =>['u' => 'LABEL_URGENT','nu' => 'LABEL_NOT_URGENT'],],'attributes'=> ['required'=> true,'class' => 'Custom-select','id' => 'urgent',]]);$this->add(['name' => 'status','type' => \Laminas\Form\Element\Checkbox::class,'attributes' => ['id' => 'status',],'options' => ['use_hidden_element' => 0,'unchecked_value' => \LeadersLinked\Model\PlanningObjectivesAndGoalsTask::STATUS_INACTIVE,'checked_value'=> \LeadersLinked\Model\PlanningObjectivesAndGoalsTask::STATUS_ACTIVE,]]);}}