protected function createComponentEditForm() { $form = new \CustomForm(); $form->addRadioList('icon', 'Ikonka', $this->icons); $form->addTextArea('text', 'Text'); $form->addText('link', 'Odkaz (celá URL adresa)', 1000); $form->addSubmit('create', 'Uložit'); $form->addSubmit('cancel', 'Zrušit')->setValidationScope(FALSE); $form->setCustomRenderer(); $form->onSuccess[] = array($this, 'editFormSucceeded'); return $form; }
protected function createComponentEditForm() { $form = new \CustomForm(); $form->addUpload('img', 'Obrázek:')->addCondition(\Nette\Application\UI\Form::FILLED)->addRule(\Nette\Application\UI\Form::IMAGE, 'Soubor musí být JPEG, PNG nebo GIF.'); $form->addText('title', 'Nadpis', 50, 255); $form->addText('subtitle', 'Podtitulek', 50, 255); $form->addTextArea('text', 'Text'); $form->addText('link', 'Odkaz (celá URL adresa)', 50); $form->addText('link_text', 'Viditelný text odkazu', 50, 32); $form->addSubmit('create', 'Uložit'); $form->addSubmit('cancel', 'Zrušit')->setValidationScope(FALSE); $form->setCustomRenderer(); $form->onSuccess[] = array($this, 'editFormSucceeded'); return $form; }
protected function createComponentEditForm() { $form = new \CustomForm(); $form->addUpload('img', 'Obrázek:')->addCondition(\Nette\Application\UI\Form::FILLED)->addRule(\Nette\Application\UI\Form::IMAGE, 'Soubor musí být JPEG, PNG nebo GIF.'); $form->addText('title', 'Nadpis', 50)->addRule(\Nette\Application\UI\Form::FILLED, 'Je nutné zadat nadpis.'); $form->addText('subtitle', 'Podtitulek', 50); $form->addTextArea('text', 'Text')->setAttribute("class", "tinymce_text_editor")->addRule(\Nette\Application\UI\Form::FILLED, 'Je nutné zadat text.'); $form->addText('client', 'Zákazník (jméno, město, ...)', 50); $form->addText('link', 'Odkaz (celá URL adresa)', 50); $form->addSubmit('create', 'Uložit'); $form->addSubmit('cancel', 'Zrušit')->setValidationScope(FALSE); $form->setCustomRenderer(); $form->onSuccess[] = array($this, 'editFormSucceeded'); return $form; }