コード例 #1
0
ファイル: UlPresenter.php プロジェクト: cujan/vcelyweb
 protected function createComponentUlForm($name)
 {
     //$identifikatory = array('1'=>'prijem','-1'=>'vydaj');
     $typUla = $this->ciselnikTypUla->findAll()->fetchPairs('id', 'nazov');
     $vcelnica = $this->vcelnica->findAll()->fetchPairs('id', 'nazov');
     $form = new Form();
     $form->addText('nazov', 'Nazov ula');
     $form->addSelect('idCiselnikTypUla', 'Typ ula', $typUla)->setPrompt('- Zvoľte typ ula -')->setRequired();
     $form->addSelect('idVcelnica', 'Vcelnica', $vcelnica)->setPrompt('- Zvoľte vcelnicu -')->setRequired();
     $form->addText('matkaRokLiahnutia', 'Matka rok vyliahnutia');
     $form->addText('matkaLinia', 'Matka linia');
     $form->addText('matkaOplodnenost', 'Matka oplodnenost');
     $form->addText('matkaFarba', 'Matka Farba');
     $form->addDatePicker('matkaDatumVlozenia', 'Matka datum vlozenia do vcelstva', 10, 10);
     $form->addSubmit('save', 'Save')->setAttribute('class', 'default')->onClick[] = $this->vlozitTransakciuFormSucceeded;
     $form->addSubmit('cancel', 'Cancel')->setValidationScope(array())->onClick[] = $this->formCancelled;
     return $form;
 }
コード例 #2
0
ファイル: VcelnicaPresenter.php プロジェクト: cujan/vcelyweb
 public function deleteFormSucceeded()
 {
     $this->vcelnica->findById($this->getParameter('id'))->delete();
     $this->flashMessage('Transakcia bola zmazana.');
     $this->redirect('default');
 }