From: <gem...@li...> - 2011-09-27 10:38:17
|
Revision: 76 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=76&view=rev Author: mennodekker Date: 2011-09-27 10:38:07 +0000 (Tue, 27 Sep 2011) Log Message: ----------- Append class attrib to the displaygroup for better css control Removed escaping from labels for better styling Modified Paths: -------------- trunk/library/classes/Gems/Form/TableForm.php trunk/library/classes/Gems/TabForm.php Modified: trunk/library/classes/Gems/Form/TableForm.php =================================================================== --- trunk/library/classes/Gems/Form/TableForm.php 2011-09-26 16:29:02 UTC (rev 75) +++ trunk/library/classes/Gems/Form/TableForm.php 2011-09-27 10:38:07 UTC (rev 76) @@ -118,9 +118,9 @@ array(array('data' => 'HtmlTag'), array('tag' => 'td', 'class' => 'element')), array(array('labelCellClose' => 'HtmlTag'), array('tag' => 'td', 'placement'=> Zend_Form_Decorator_Abstract::PREPEND, 'closeOnly'=>true)), array('Tooltip'), - array('Description', array('tag'=>'label', 'class'=>'optional', 'placement'=> Zend_Form_Decorator_Abstract::PREPEND)), + array('Description', array('tag'=>'label', 'class'=>'optional', 'placement'=> Zend_Form_Decorator_Abstract::PREPEND, 'escape'=>false)), array(array('labelCellOpen' => 'HtmlTag'), array('tag' => 'td', 'class'=>'label', 'placement'=> Zend_Form_Decorator_Abstract::PREPEND, 'openOnly'=>true)), - array(array('row' => 'HtmlTag'), array('tag' => 'tr', 'class' => $this->_alternate . ' ' . $group->getName())) + array(array('row' => 'HtmlTag'), array('tag' => 'tr', 'class' => $this->_alternate . ' ' . $group->getName(). ' ' . $group->getAttrib('class'))) )); //Now add the right decorators to the elements @@ -136,7 +136,7 @@ //If we want to see the individual fields labels, do so: if ($group->getAttrib('showLabels')===true) { - $decorators[] = 'Label'; + $decorators[] = array('Label', array('escape'=>false)); } //Apply final class and id to allow for custom styling @@ -177,7 +177,7 @@ array('Description', array('class'=>'description')), 'Errors', array('Tooltip'), - array('Label'), + array('Label', array('escape'=>false)), array(array('labelCell' => 'HtmlTag'), array('tag' => 'td', 'class'=>'label', 'colspan'=>2)), array(array('row' => 'HtmlTag'), array('tag' => 'tr', 'class' => $element->getName())) ); @@ -200,7 +200,7 @@ array(array('data' => 'HtmlTag'), array('tag' => 'td', 'class' => 'element')), array(array('labelCellClose' => 'HtmlTag'), array('tag' => 'td', 'placement'=> Zend_Form_Decorator_Abstract::PREPEND, 'closeOnly'=>true)), array('Tooltip'), - array('Label'), + array('Label', array('escape'=>false)), array(array('labelCellOpen' => 'HtmlTag'), array('tag' => 'td', 'class'=>'label', 'placement'=> Zend_Form_Decorator_Abstract::PREPEND, 'openOnly'=>true)), array(array('row' => 'HtmlTag'), array('tag' => 'tr', 'class' => $element->getName())) ); Modified: trunk/library/classes/Gems/TabForm.php =================================================================== --- trunk/library/classes/Gems/TabForm.php 2011-09-26 16:29:02 UTC (rev 75) +++ trunk/library/classes/Gems/TabForm.php 2011-09-27 10:38:07 UTC (rev 76) @@ -226,7 +226,7 @@ //Retrieve it and set decorators $group = $this->getDisplayGroup($name); $group->setDecorators( array('FormElements', - array('HtmlTag', array('tag' => 'div', 'class' => $group->getName())) + array('HtmlTag', array('tag' => 'div', 'class' => $group->getName(). ' ' . $group->getAttrib('class'))) )); } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |