- $FORM->addElement ('header', 'cabecera', 'ABM Permisos');
- $FORM->addElement ('hidden', 'id_permiso');
- $FORM->addElement ('text' , 'desc_permiso', 'Descripción', array('size'=>'50'));
- $FORM->addElement ('hidden', 'responsable' , $_SESSION['usuario']);
- $group[] = HTML_QuickForm::createElement('submit', 'aceptar' , 'Grabar');
- $group[] = HTML_QuickForm::createElement('button', 'cancelar', 'Cancelar', array ('onClick' => 'javascript:history.go(-1);return true;'));
- $FORM->addGroup($group,'botones');
+$FORM->addElement ('header', 'cabecera', 'ABM Permisos');
+$FORM->addElement ('hidden', 'id_permiso');
+$FORM->addElement ('text' , 'desc_permiso', 'Descripción',
+ array('size'=>'50'));
+$FORM->addElement ('hidden', 'responsable' , $_SESSION['usuario']);
+$FORM->addElement ('hidden', 'accion', $accion);
+$group[] = HTML_QuickForm::createElement('submit', 'aceptar', $b_accion);
+$group[] = HTML_QuickForm::createElement('button', 'cancelar', 'Cancelar',
+ array ('onClick' => 'javascript:history.go(-1);return true;'));
+$FORM->addGroup($group,'botones');