Exemplo n.º 1
0
 public function createComponentForm()
 {
     $form = parent::createComponentForm();
     $form['aktualna']->setValue(true);
     return $form;
 }
Exemplo n.º 2
0
 public function createComponentForm()
 {
     $form = parent::createComponentForm();
     return $form;
 }
Exemplo n.º 3
0
 public function createComponentForm()
 {
     $form = parent::createComponentForm();
     $dataRiesitelia = $this->context->sources->riesitelSource->getAll();
     $riesitelia = array();
     foreach ($dataRiesitelia as $riesitel) {
         $riesitelia[$riesitel['id']] = "{$riesitel['meno']} {$riesitel['priezvisko']}";
     }
     $form['riesitel']->setItems($riesitelia);
     $form['riesitel']->setPrompt('Zvoľte riešiteľa');
     $form['riesitel']->getControlPrototype()->class[] = 'chosen';
     $form['meskanie']->defaultValue = 0;
     $form['bonus']->defaultValue = 0;
     $form['seria']->value = $this['seriaSelector']->seria;
     $dataPriklady = $this->context->database->table('priklad')->select('id, cislo, kod, nazov')->where('seria_id', $this['seriaSelector']->seria)->order('cislo ASC')->fetchPairs('id');
     foreach ($dataPriklady as $priklad) {
         $form->addCheckBox("priklad.{$priklad['cislo']}", "{$priklad['kod']}");
     }
     $form->addSubmit('odosli', 'Odobálkuj');
     return $form;
 }