$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';
$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');
}