Esempio n. 1
0
 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;
 }
Esempio n. 2
0
 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;
 }
Esempio n. 3
0
 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;
 }
Esempio n. 4
0
 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;
 }
Esempio n. 5
0
 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;
 }