X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/cacc1525e7102dfef7964462a50e4ff13f02dcc6..f4200ccdcc70dccb86086059c453595dcb51674b:/lib/MECON/HTML/QuickForm/Renderer/Tabla.php diff --git a/lib/MECON/HTML/QuickForm/Renderer/Tabla.php b/lib/MECON/HTML/QuickForm/Renderer/Tabla.php index 5e04f71..a767a19 100644 --- a/lib/MECON/HTML/QuickForm/Renderer/Tabla.php +++ b/lib/MECON/HTML/QuickForm/Renderer/Tabla.php @@ -1,35 +1,39 @@ - | -// | Adam Daniel | -// | Bertrand Mansion | -// +----------------------------------------------------------------------+ -// -// $Id$ + +------------------------------------------------------------------------------- +$Id$ +-----------------------------------------------------------------------------*/ require_once 'HTML/QuickForm/Renderer.php'; require_once 'MECON/HTML/Tabla.php'; /** - * A concrete renderer for HTML_QuickForm, - * based on QuickForm 2.x built-in one + * QuickForm renderer que usa Tabla como backend. + * Basado en el QuickForm Renderer basico. * * @access public */ -class HTML_QuickForm_Renderer_Tabla extends HTML_QuickForm_Renderer { +class MECON_HTML_QuickForm_Renderer_Tabla extends HTML_QuickForm_Renderer { /** * Tabla usada para dibujar el formulario. @@ -88,7 +92,7 @@ class HTML_QuickForm_Renderer_Tabla extends HTML_QuickForm_Renderer { * * @access public */ - function HTML_QuickForm_Renderer_Tabla($style = 'width="400"') + function MECON_HTML_QuickForm_Renderer_Tabla($style = array()) { $this->HTML_QuickForm_Renderer(); $this->_tabla =& new Tabla($style); @@ -184,7 +188,7 @@ class HTML_QuickForm_Renderer_Tabla extends HTML_QuickForm_Renderer { $element->toHtml() . ($error ? "
$error" : ''), ) ); - $this->_tabla->updateCellAttributes($id, 0, array('titulo' => true, 'align' => 'left', 'nowrap' => true)); + $this->_tabla->updateCellAttributes($id, 0, array('titulo' => true, 'align' => 'left')); $this->_tabla->updateCellAttributes($id, 1, array('align' => 'left')); } else { $this->_groupElements[] = ($element->getLabel() ? ($element->getLabel().' ') : '') . $element->toHtml(); @@ -250,14 +254,15 @@ class HTML_QuickForm_Renderer_Tabla extends HTML_QuickForm_Renderer { $id = $this->_tabla->addRow( array(join('', $this->_groupElements)) ); - $this->_tabla->updateCellAttributes($id, 0, array('align' => 'right', 'colspan' => 2)); + $this->_tabla->updateCellAttributes($id, 0, array('valign' => 'middle', 'align' => 'center', 'colspan' => 2)); } else { $id = $this->_tabla->addRow( array($group->getLabel(), join($sep, $this->_groupElements)), - array('align' => 'left') + array('valign' => 'middle', 'align' => 'left') ); - $this->_tabla->updateCellAttributes($id, 0, array('titulo' => true, 'align' => 'left', 'nowrap' => true)); + $this->_tabla->updateCellAttributes($id, 0, array('titulo' => true, 'align' => 'left')); } + $this->_inGroup = false; } // end func finishGroup } // end class HTML_QuickForm_Renderer_Default