public function createComponentForm()
 {
     $sources = $this->context->sources;
     $showFKS = $sources->kategoria->id === 1;
     $form = new \RiesitelForm('form', $sources->SkolaSource->getAll(), $sources->typStudiaSource->getAll(), $showFKS);
     $form->addSubmit('odosli', 'Odošli');
     $form->onSuccess[] = callback($this, 'onSubmit');
     $form->onSubmit[] = callback($this, 'setSubmitted');
     return $form;
 }
Beispiel #2
0
 public function createComponentUdajeForm()
 {
     $sources = $this->context->sources;
     $showFKS = $sources->kategoria->id === 1;
     $form = new \RiesitelForm('udajeForm', $sources->skolaSource->getAll(), $sources->typStudiaSource->getAll(), $showFKS);
     $form->addSubmit('odosli', 'Odošli');
     /** Add required */
     $form['osoba.email']->setRequired('Zadaj svoj email');
     $form['osoba.datum_narodenia']->setRequired('Vyplň dátum narodenia');
     $form['osoba.telefon']->setRequired('Vyplň svoj telefón');
     return $form;
 }