Esempio n. 1
0
       $t->linkName = "order";
       $frm->VLine(10, $ypos += 40, 280);
       $frm->Button("Сохранить", 40, $ypos += 20, 100, true);
       $b = $frm->Button("К списку", 160, $ypos, 100, false);
       $b->Event = "document.location.href='?section=admin&subsection=3&action=list'";
       $frm->height = $ypos + 60;
       break;
   case 'edit':
       $command_id = $_GET['command'];
       $GUI->cmdmenu->AddItem("Удалить", "?section=admin&subsection=3&action=del&command=" . $command_id);
       $ypos = 0;
       $frm = $GUI->Form("Редактировать команду №" . $command_id, 300, 0);
       $frm->OnExecute = "edit_command";
       $t = $frm->Hidden($command_id);
       $t->linkName = 'id';
       $command_info = Command::find($command_id);
       $frm->Label("Имя", 10, $ypos += 20);
       $t = $frm->Text(25, $ypos += 20, 250, $command_info['name']);
       $t->AddValidator(new CGUI_VALIDATOR_NOEMPTY());
       $t->linkName = "name";
       $ypos += 30;
       $frm->Label("Родительский модуль", 10, $ypos += 20);
       $ss = $frm->Select(25, $ypos += 20, 250, get_modules(true), '', $command_info['module_id']);
       $ss->AddValidator(new CGUI_VALIDATOR_NOZERO());
       $ss->linkName = "module_id";
       $ypos += 30;
       $jq = <<<jQ
 var module_id = jQuery(this).val();
 var field_number = parseInt(jQuery(this).attr('id').substr(18, 1));
 jQuery.ajax({
   type:"POST",