foreach ($roles_miembros as $m) { $m = new seguridad_role($m); $return[$i]['id'] = $m->get('role'); $return[$i]['name'] = $m->get('name'); ++$i; } $ari->t->assign("roles_miembros", $return); } //end if //search roles no members if ($roles = oob_perspective::searchNoMembers("", DELETED, OPERATOR_DISTINCT, $perspective->name(), ROLE)) { $i = 0; $return = array(); foreach ($roles as $r) { $r = new seguridad_role($r); $return[$i]['id'] = $r->get('role'); $return[$i]['name'] = $r->get('name'); ++$i; } $ari->t->assign("roles", $return); } //end if //Adds the selected modules if (isset($_POST['AddModule']) && isset($_POST['modules_select'])) { foreach ($_POST['modules_select'] as $name_module) { $perspective->addModule($name_module); } } // end if isset //Removes the selected modules if (isset($_POST['DelModule']) && isset($_POST['modules_members_select'])) {
$role = ''; if (isset($_POST['id'])) { $role = new seguridad_role($_POST['id']); } else { throw new OOB_Exception_400("La variable [id] no esta definida"); } PhpExt_Javascript::sendContentType(); if (isset($_POST['gid'])) { $grid_id = $_POST['gid']; } $field_width = 180; //ancho de los controles $page_size = PAGE_SIZE; //CONTROLES //nombre del role $txt_nombre = PhpExt_Form_TextField::createTextField("txt_nombre", "Nombre")->setWidth($field_width)->setMsgTarget(PhpExt_Form_FormPanel::MSG_TARGET_SIDE)->setValue($role->get("name")); //descripcion del role $txt_descripcion = PhpExt_Form_TextArea::createTextArea("txt_descripcion", "Descripción")->setMsgTarget(PhpExt_Form_FormPanel::MSG_TARGET_SIDE)->setWidth($field_width)->setValue($role->get("description")); //usuario anonimo $chk_anonimo = PhpExt_Form_Checkbox::createCheckbox("chk_anonimo", "Anónimo")->setMsgTarget(PhpExt_Form_FormPanel::MSG_TARGET_SIDE)->setWidth($field_width); if ($role->get("anonymous") == ANONIMO) { $chk_anonimo->setChecked(true); } //usuario confiado $chk_confiados = PhpExt_Form_Checkbox::createCheckbox("chk_confiados", "Confiado")->setMsgTarget(PhpExt_Form_FormPanel::MSG_TARGET_SIDE)->setWidth($field_width); if ($role->get("trustees") == YES) { $chk_confiados->setChecked(true); } $tab_panel = new PhpExt_TabPanel(); $tab_panel->setPlain(true)->setActiveTab(0)->setHeight(300)->setWidth(550)->setDefaults(new PhpExt_Config_ConfigObject(array("bodyStyle" => "padding:10px"))); $usuarios_from_store = new PhpExt_Data_JsonStore();