protected function createComponentSettings() { $form = new \CustomForm(); $form->addUpload('logo', 'Logo')->addCondition(\Nette\Application\UI\Form::FILLED)->addRule(\Nette\Application\UI\Form::IMAGE, 'Soubor musí být JPEG, PNG nebo GIF.'); $form->addText('title', 'Titulek stránky', 64); $form->addText('description', 'Popis stránky', 256); $form->addText('keywords', 'Klíčová slova stránky', 512); $form->addText('email', 'Hlavní e-mail', 512); $form->addHidden("layout"); $form->addText('layoutVisible', 'Layout')->setDisabled()->setValue($this->settings["layout"]->getTitle()); $form->addSubmit('setLayout', 'Vybrat jiný layout')->setAttribute("data-toggle", "modal")->setAttribute("data-target", "#layoutWizard")->setAttribute("type", "button"); $form->addSubmit('addPage', 'Uložit'); $defaults = $this->settings; $defaults["layout"] = $this->settings["layout"]->getName(); $form->setDefaults($defaults); $form->onSuccess[] = array($this, 'addPageModuleToPageFormSucceeded'); $form->setCustomRenderer(); return $form; }