/content/code/trunk/administrator/components/com_artofcontent/libraries/jxtended/form/fields/textarea.php
PHP | 45 lines | 15 code | 5 blank | 25 comment | 1 complexity | bae7261fab1f4e633074149adae8f7ad MD5 | raw file
- <?php
- /**
- * @version $Id: textarea.php 484 2010-12-20 23:40:27Z eddieajau $
- * @package JXtended.Libraries
- * @subpackage Form
- * @copyright Copyright 2005 - 2010 New Life in IT Pty Ltd. All rights reserved.
- * @license GNU General Public License
- * @link http://www.theartofjoomla.com
- */
- defined('JPATH_BASE') or die;
- juimport('jxtended.form.formfield');
- /**
- * Form Field class for JXtended Libraries.
- *
- * @package JXtended.Libraries
- * @subpackage Form
- * @since 1.1
- */
- class JFormFieldTextarea extends JFormField
- {
- /**
- * The field type.
- *
- * @var string
- */
- protected $type = 'Textarea';
- /**
- * Method to get the field input.
- *
- * @return string The field input.
- */
- protected function _getInput()
- {
- $rows = $this->_element->attributes('rows');
- $cols = $this->_element->attributes('cols');
- $class = $this->_element->attributes('class') ? 'class="'.$this->_element->attributes('class').'"' : 'class="text_area"';
- $readonly = $this->_element->attributes('readonly') == 'true' ? ' readonly="readonly"' : '';
- return '<textarea name="'.$this->inputName.'" cols="'.$cols.'" rows="'.$rows.'" '.$class.$readonly.' id="'.$this->inputId.'" >'.htmlspecialchars($this->value).'</textarea>';
- }
- }