Пример #1
0
function edit_command($Frm, $Err)
{
    if (!$Err) {
        Command::update($Frm->GetNmValueI('id'), array('module_id' => $Frm->GetNmValueI("module_id"), 'submodule_id' => $Frm->GetNmValueI("submodule_id"), 'name' => $Frm->GetNmValueH("name"), 'order' => $Frm->GetNmValueI("order")));
        $Frm->_gui->OK("Команда обновлена");
        page_reloadSubSec();
    }
}
Пример #2
0
      });

      jQuery('#cgui_form_0_field_'+(field_number+1)+'').html(options);
    }
  });
jQ;
        $ss->AddJsEvent("change", $jq);
        $frm->Label("Подмодуль", 10, $ypos += 20);
        $t = $frm->Select(25, $ypos += 20, 250, get_submodules($command_info['module_id']), '', $command_info['submodule_id']);
        $t->AddValidator(new CGUI_VALIDATOR_NOZERO());
        $t->linkName = "submodule_id";
        $ypos += 30;
        $frm->Label("Порядок отображения в меню", 10, $ypos += 20);
        $t = $frm->Text(25, $ypos += 20, 40, $command_info['order']);
        $t->AddValidator(new CGUI_VALIDATOR_NOEMPTY());
        $t->AddValidator(new CGUI_VALIDATOR_09());
        $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 'del':
        Command::delete($_REQUEST['command']);
        $GUI->OK("Команда удалена");
        page_reloadSubSec();
        break;
    default:
        break;
}