From: Martín Marrese Date: Mon, 16 Feb 2004 22:23:58 +0000 (+0000) Subject: BugFixes en HTML/Perfil.php y HTML/Usuario.php. X-Git-Tag: svn_import~31 X-Git-Url: https://git.llucax.com/mecon/samurai.git/commitdiff_plain/4ad1c83d8c0d8a73e7b10b1bac81845351bca415 BugFixes en HTML/Perfil.php y HTML/Usuario.php. --- diff --git a/lib/SAMURAI/HTML/Perfil.php b/lib/SAMURAI/HTML/Perfil.php index 92c25a6..72af3dc 100644 --- a/lib/SAMURAI/HTML/Perfil.php +++ b/lib/SAMURAI/HTML/Perfil.php @@ -311,6 +311,22 @@ function SAMURAI_HTML_Perfil(&$MARCO, $id_sistema) { else { $id_perfil = 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; + } + //}}} $FORM =& new MECON_HTML_QuickForm ('samurai_perfiles','post',$_SERVER['PHP_SELF']); $SISTEMA =& new SAMURAI_Sistema ($DB, $id_sistema); $PERFIL =& new SAMURAI_Perfil ($DB, $id_perfil, $id_sistema); @@ -353,7 +369,8 @@ function SAMURAI_HTML_Perfil(&$MARCO, $id_sistema) { $FORM->addElement ('select', 'tipo_perfil', 'Tipo Perfil', array('E' => 'Externo', 'I' => 'Interno', 'D' => 'Dios'), array ('size' => '1')); } $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=\''.$_SERVER['PHP_SELF'].'\';return false;')); $FORM->addGroup($group,'botones'); } diff --git a/lib/SAMURAI/HTML/Usuario.php b/lib/SAMURAI/HTML/Usuario.php index b858e0c..8206fda 100644 --- a/lib/SAMURAI/HTML/Usuario.php +++ b/lib/SAMURAI/HTML/Usuario.php @@ -195,7 +195,7 @@ function SAMURAI_HTML_Usuario(&$MARCO, $id_sistema) { $login = null; } //XXX OBTENGO LA ACCION {{{ - switch ($_REQUEST['accion']) { + switch (@$_REQUEST['accion']) { case 'm': $b_accion = 'Modificar'; $accion = 'm';