$ypos += 30; $s->AddJsEvent("change", " jQuery('#" . $t->idname . "').val(''); "); $t->AddJsEvent("keyup", " jQuery('#" . $s->idname . "').val(0); "); $frm->Label("Направление (факультет)", 10, $ypos); $frm->Label("Дисциплина", 190, $ypos); $ypos += 20; $s = $frm->Select(10, $ypos, 160, array(0 => array("name" => "-выберите-")) + $data_napravl, "name", $order_info["napr_id"]); //6 $s->linkName = "napr"; $t = $frm->Hidden(isset($data_discip[$order_info["disc_id"]]) ? $order_info["disc_id"] : $order_info["disc_user"]); // 8 $t->linkName = "disc_usr"; $t->class = 'discipline_select2'; $disciplines = Discipline::findAll(); foreach ($disciplines as &$discipline) { $discipline['authors_qt'] = Disciplines::getAuthorsQt($discipline['id']); } unset($discipline); page_AddScriptText('var disciplines = ' . json_encode($disciplines) . ';'); $ypos += 30; $frm->Label("Тема работы", 10, $ypos); $ypos += 20; $t = $frm->TextArea(10, $ypos, 625, 60, $order_info["subject"]); //9 $t->linkName = "subj"; $t->AddValidator(new CGUI_VALIDATOR_NOEMPTY()); $t->AddValidator(new CGUI_VALIDATOR_MAXLEN(512)); $ypos += 70; $frm->Label("Дата сдачи", 10, $ypos); $frm->Label("Практика", 110, $ypos); $frm->Label("Число страниц", 230, $ypos);
function get_authors_qt_for_discipline($value, $row, $table, $info) { return Disciplines::getAuthorsQt($row['id']); }