X-Git-Url: https://git.llucax.com/mecon/samurai.git/blobdiff_plain/5b15a6f7796a86dfeaf9f41911e7cb112f2c6a97..2c6b8b8d402937bf451ea8c2d76290eeff15247c:/sistema/www/perfiles/perfiles-abm.php?ds=sidebyside diff --git a/sistema/www/perfiles/perfiles-abm.php b/sistema/www/perfiles/perfiles-abm.php index d990e53..0440f45 100644 --- a/sistema/www/perfiles/perfiles-abm.php +++ b/sistema/www/perfiles/perfiles-abm.php @@ -28,6 +28,23 @@ if (!$SAMURAI_PERM->tiene(SAMURAI_PERM_DEVELOPER)) { $MARCO =& new MECON_Marco ('/var/www/sistemas/samurai/sistema/conf/confSecciones.php', $SAMURAI_PERM); //}}} +//XXX OBTENGO LA ACCION {{{ +switch (@$_REQUEST['accion']) { + case 'm': + $b_accion = 'Modificar'; + $accion = 'm'; + break; + case 'e': + $b_accion = 'Eliminar'; + $accion = 'e'; + break; + default: + $b_accion = 'Grabar'; + $accion = ''; + break; +} +//}}} + // REQUIRE_ONCE {{{ require_once 'MECON/HTML/QuickForm.php'; require_once 'MECON/HTML/Tabla.php'; @@ -48,6 +65,7 @@ $MARCO =& new MECON_Marco ('/var/www/sistemas/samurai/sistema/conf/confSecciones $id_perfil = null; } $FORM = new MECON_HTML_QuickForm ('perfiles_abm','post','perfiles-abm'); + $FORM->renderer->updateAttributes('width="400"'); $SISTEMA = new SAMURAI_Sistema ($DB, $_SESSION['samurai']['id_sistema']); $PERFIL = new SAMURAI_Perfil ($DB, $id_perfil, $_SESSION['samurai']['id_sistema']); @@ -83,10 +101,11 @@ $MARCO =& new MECON_Marco ('/var/www/sistemas/samurai/sistema/conf/confSecciones $FORM->addElement ('header', 'cabecera', 'ABM Perfiles'); $FORM->addElement ('hidden', 'id_perfil', $id_perfil); $FORM->addElement ('hidden', 'desc_ant' , $descripcion); - $FORM->addElement ('static', 'desc_perfil', 'Descripcion', $descripcion); + $FORM->addElement ('static', 'desc_perfil', 'DescripciĆ³n', $descripcion); $FORM->addElement ('select', 'permisos' , 'Permisos' , $PERMISOS, array('size' => '5', 'multiple' => 'true')); $FORM->addElement ('hidden', 'responsable', $responsable); - $group[] = HTML_QuickForm::createElement('submit', 'aceptar' , 'Grabar'); + $FORM->addElement ('hidden', 'accion', $accion); + $group[] = HTML_QuickForm::createElement('submit', 'aceptar' , $b_accion); $group[] = HTML_QuickForm::createElement('submit', 'cancelar', 'Cancelar', array ('onClick' => 'javascript:window.location=\'perfiles\';return false;')); $FORM->addGroup($group,'botones'); }