[Pieforms-commit] SF.net SVN: pieforms: [153] pieforms-php5/trunk/src
Status: Alpha
Brought to you by:
oracleshinoda
From: <ora...@us...> - 2006-12-27 09:09:44
|
Revision: 153 http://svn.sourceforge.net/pieforms/?rev=153&view=rev Author: oracleshinoda Date: 2006-12-27 01:09:43 -0800 (Wed, 27 Dec 2006) Log Message: ----------- Add 'class=pieform' to all pieforms, so they can be targetted by javascript routines. Add a class of 'resizable' to textareas if needed, so javascript can target them Modified Paths: -------------- pieforms-php5/trunk/src/pieform/elements/textarea.php pieforms-php5/trunk/src/pieform.php Modified: pieforms-php5/trunk/src/pieform/elements/textarea.php =================================================================== --- pieforms-php5/trunk/src/pieform/elements/textarea.php 2006-12-27 06:23:15 UTC (rev 152) +++ pieforms-php5/trunk/src/pieform/elements/textarea.php 2006-12-27 09:09:43 UTC (rev 153) @@ -55,6 +55,10 @@ Pieform::info('No value for cols or width specified for textarea "' . $element['name'] . '"'); } $element['style'] = (isset($element['style'])) ? $style . $element['style'] : $style; + + if (!empty($element['resizable'])) { + $element['class'] = (isset($element['class']) && $element['class']) ? $element['class'] . ' resizable' : 'resizable'; + } return '<textarea' . (($rows) ? ' rows="' . $rows . '"' : '') . (($cols) ? ' cols="' . $cols . '"' : '') Modified: pieforms-php5/trunk/src/pieform.php =================================================================== --- pieforms-php5/trunk/src/pieform.php 2006-12-27 06:23:15 UTC (rev 152) +++ pieforms-php5/trunk/src/pieform.php 2006-12-27 09:09:43 UTC (rev 153) @@ -599,7 +599,7 @@ * @return string */ public function get_form_tag() { - $result = '<form'; + $result = '<form class="pieform"'; foreach (array('name', 'method', 'action') as $attribute) { $result .= ' ' . $attribute . '="' . $this->data[$attribute] . '"'; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |