protected function createComponentMetaAddForm() { $form = new AppForm(); $form->getElementPrototype()->class('ajax'); $form->addText('key', 'klíč')->getControlPrototype()->style = 'width:90px'; $form->addText('value', 'hodnota'); $form->addSubmit('submit1', 'Přidat'); $form->onSuccess[] = callback($this, 'metaAddFormSubmitted'); return $form; }
public function createComponentRedirectEditForm() { $form = new AppForm(); $form->getElementPrototype()->class('ajax'); $form->addHidden('id'); $form->addText('oldurl', 'stará adresa'); $form->addText('newurl', 'nová adresa'); $form->addSubmit('submit1', 'OK'); $form->onSuccess[] = callback($this, 'redirectEditFormSubmitted'); return $form; }
public function createComponentTranslationsAddForm() { $form = new AppForm(); $form->getElementPrototype()->class('ajax'); $form->addHidden('id'); $form->addText('key', 'Klíč'); foreach ($this->context->params["langs"] as $l => $txt) { $form->addText($l, $txt); } $form->addSubmit('submit1', 'OK'); $form->onSuccess[] = callback($this, 'editFormSubmitted'); return $form; }
public function createComponentPreviewUploadForm() { $form = new AppForm(); $form->getElementPrototype()->class('ajax_upload'); $form->addHidden("id"); $form->addUpload("file", "soubor"); $form->addSubmit("submit1", "Nahrát"); $form->onSuccess[] = callback($this, 'previewUploadFormSubmitted'); return $form; }
public function createComponentPageEditForm() { $form = new AppForm(); $form->getElementPrototype()->class('ajax'); $form->addHidden("id_page"); $form->addText("heading", "nadpis"); $form->addText("name", "v menu"); $form->addText("seoname", "adresa")->setAttribute('placeholder', '(automatická)'); $form->addCheckbox("published", "publikováno"); $form->addTextArea("text", "obsah stránky"); $form['text']->getControlPrototype()->class('textarea'); $form->addSubmit("submit1", "Uložit"); $form->onSuccess[] = callback($this, 'pageEditFormSubmitted'); //add additional inputs $this->triggerEvent_filter('filterPageEditForm_create', $form); return $form; }