X-Git-Url: https://git.llucax.com/mecon/samurai.git/blobdiff_plain/6f39b8afae2fef6d4da703c44495a9d72b7b0f1b..2d6f8464fb2007ab8dd61432bc49218001773338:/sistema/www/sistemas/sistemas-abm.php diff --git a/sistema/www/sistemas/sistemas-abm.php b/sistema/www/sistemas/sistemas-abm.php index 7311db3..d063345 100644 --- a/sistema/www/sistemas/sistemas-abm.php +++ b/sistema/www/sistemas/sistemas-abm.php @@ -31,6 +31,23 @@ require_once 'SAMURAI/Permiso.php'; // }}} // }}} + +//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; +} +//}}} //VERIFICO SI SE TIENE ACCESO A LA PAGINA{{{ $SAMURAI_PERM->setSistema(SAMURAI_PERM); if (!$SAMURAI_PERM->tiene(SAMURAI_PERM_DEVELOPER)) { @@ -63,7 +80,8 @@ $MARCO =& new MECON_Marco ('/var/www/sistemas/samurai/sistema/conf/confSecciones $FORM->addElement ('textarea', 'contacto' , 'Contacto' , array('rows' => '2','cols'=>'50')); $FORM->addElement ('select' , 'permisos' , 'Permisos' , $PERMISOS, array('size' => '5', 'multiple' => 'multiple')); $FORM->addElement ('hidden' , 'responsable' , $_SESSION['usuario']); - $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 =\'sistemas\';return false;')); $FORM->addGroup($group,'botones'); // }}} @@ -168,7 +186,6 @@ $MARCO =& new MECON_Marco ('/var/www/sistemas/samurai/sistema/conf/confSecciones //ELIMINACION -> modifico el valor del boton if ($_GET['accion'] == 'e') { $aceptar->setValue('Eliminar'); - $aceptar->updateAttributes(array ('onClick' => 'javascript:if (confirm(\'¿Esta Seguro?\')) return true;return false;')); $FORM->freeze(); } }