protected function create() { parent::create(); $this->form->addDate('Start-Date', ['autocomplete' => false]); $this->form->addTime('Start-Time', ['autocomplete' => false]); $now = new \DateTime('now'); $this->form->addDate('End-Date', ['list' => [$this->toDate($now)], 'autocomplete' => false]); $this->form->addTime('End-Time', ['list' => [$this->toTime($now)], 'autocomplete' => false]); }
protected function create() { parent::create(); $todos = $this->controller->getTodos(); $id = $this->object->getId(); $parentList = ['null' => null]; foreach ($todos as $todo) { if ($todo->getId() != $id) { $parentList[$todo->getId()] = $todo; } } $this->form->addSingle('Parent', ['skin' => 'select', 'list' => $parentList, 'autocomplete' => false]); $this->form->addBoolean('Done'); }