$FORM->addElement ('mdate' , 'fecha_implementacion', 'Fecha Implementacion');
$FORM->addElement ('textarea', 'contacto' , 'Contacto' , array('rows' => '2','cols'=>'50'));
$FORM->addElement ('select' , 'permisos' , 'Permisos' , $PERMISOS, array('size' => '5', 'multiple' => 'multiple'));
$FORM->addElement ('mdate' , 'fecha_implementacion', 'Fecha Implementacion');
$FORM->addElement ('textarea', 'contacto' , 'Contacto' , array('rows' => '2','cols'=>'50'));
$FORM->addElement ('select' , 'permisos' , 'Permisos' , $PERMISOS, array('size' => '5', 'multiple' => 'multiple'));
- $FORM->addElement ('static' , 'responsable' , 'Responsable' , $_SESSION['samurai']['login']);
- $group[] = HTML_QuickForm::createElement('submit', 'aceptar' , 'Grabar');
- $group[] = HTML_QuickForm::createElement('submit', 'cancelar', 'Cancelar');
+ $FORM->addElement ('hidden' , 'responsable' , $_SESSION['samurai']['login']);
+ $group[] = HTML_QuickForm::createElement('submit', 'aceptar' , 'Grabar', array ('onClick' => 'javascript:if (confirm(\'¿Esta Seguro?\')) return true;return false;'));
+ $group[] = HTML_QuickForm::createElement('submit', 'cancelar', 'Cancelar', array ('onClick' => 'javascript:window.location = ->\'sistemas\';return false;'));
$FORM->addGroup($group,'botones');
// }}}
//AGREGO LAS REGLAS DE VALIDACION DE LOS ELEMENTOS {{{
$FORM->addGroup($group,'botones');
// }}}
//AGREGO LAS REGLAS DE VALIDACION DE LOS ELEMENTOS {{{
$botones = $FORM->getSubmitValue('botones');
if (@$botones['cancelar']) {
header ('Location: sistemas');
}
else {
$res = $SISTEMA->guardarDatos($aceptar->getValue());
$botones = $FORM->getSubmitValue('botones');
if (@$botones['cancelar']) {
header ('Location: sistemas');
}
else {
$res = $SISTEMA->guardarDatos($aceptar->getValue());