protected function createComponentListingMassItemsChangeForm() { $form = $this->itemUpdateFormFactory->create(); $form['otherHours']->setDefaultValue(0); unset($form['day'], $form['locality'], $form['description'], $form['descOtherHours']); $form->addCheckbox('newListing', 'Založit novou výčetku')->setDefaultValue(true); $form['save']->caption = 'Změnit položky'; $form->onSuccess[] = $this->processMassItemsChange; $form->addProtection(); $form->getElementPrototype()->class = 'ajax'; return $form; }
/** * @Actions edit */ protected function createComponentItemForm() { $form = $this->itemUpdateFormFactory->create(); $form->onSuccess[] = [$this, 'processSaveItem']; return $form; }