From fbf81957a8f5508c7158ce1dfe103b33aec84edc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mart=C3=ADn=20Marrese?= Date: Mon, 16 Feb 2004 22:18:52 +0000 Subject: [PATCH] BugFix en HTML/Usuario.php. --- lib/SAMURAI/HTML/Usuario.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/lib/SAMURAI/HTML/Usuario.php b/lib/SAMURAI/HTML/Usuario.php index 2eb933f..b858e0c 100644 --- a/lib/SAMURAI/HTML/Usuario.php +++ b/lib/SAMURAI/HTML/Usuario.php @@ -194,6 +194,22 @@ function SAMURAI_HTML_Usuario(&$MARCO, $id_sistema) { $validar = 1; $login = null; } + //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; + } + //}}} $TABLA = new MECON_HTML_Tabla ('cellspacing=0'); $FORM = new MECON_HTML_QuickForm ('samurai_usuarios','post', $_SERVER['PHP_SELF']); $SISTEMA = new SAMURAI_Sistema($DB, $id_sistema); @@ -224,7 +240,8 @@ function SAMURAI_HTML_Usuario(&$MARCO, $id_sistema) { } $FORM->addElement ('select', 'perfiles' , 'Perfiles', $PERFILES, array('size' => '5', 'multiple' => 'true')); $FORM->addElement ('hidden', 'responsable', $_SESSION['samurai']['login']); - $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 = \''.$_SERVER['PHP_SELF'].'\';return false;')); $FORM->addGroup($group,'botones'); } -- 2.43.0