public function to($type) { if ($type == 'html' && $this->cfg->mode == 'edit') { response::getInstance()->addJs('checkboxFields'); } return parent::to($type); }
public function to($type) { $ret = parent::to($type); if ($type == 'html' && $this->cfg->mode == 'edit') { $ret = '<span id="' . $this->id . 'Container">' . $ret . '</span>'; $resp = response::getInstance(); $resp->addJs('jqueryui'); $resp->addJs('formAutocomplete'); $prm = $this->cfg->jsPrm; $prm['name'] = $this->id . '[]'; $prm['nameNew'] = $this->id . '[new]'; $resp->blockJquery('$("#' . $this->id . 'Container").formAutocomplete(' . json_encode($prm) . ');'); } return $ret; }
function checkbox($label = '', $name = '', $value = '') { $component = new form_checkbox($label, $name, $value); if ($this->is_table) { //nastavime vypisovani bunek celeho radku tabulky $component->set_cell(1); } $component->set_golden($this->is_golden); return $component; }