10 defined(
'JPATH_PLATFORM') or die;
29 protected $type =
'Textarea';
56 public function __get($name)
65 return parent::__get($name);
78 public function __set($name, $value)
84 $this->name = (int) $value;
88 parent::__set($name, $value);
106 public function setup(SimpleXMLElement $element, $value, $group = null)
108 $return = parent::setup($element, $value, $group);
112 $this->rows = isset($this->element[
'rows']) ? (int) $this->element[
'rows'] :
false;
113 $this->columns = isset($this->element[
'cols']) ? (int) $this->element[
'cols'] :
false;
127 protected function getInput()
130 $hint = $this->translateHint ?
JText::_($this->hint) : $this->hint;
133 $class = !empty($this->
class) ?
' class="' . $this->
class . '"' : '';
134 $disabled = $this->disabled ? ' disabled' : '';
135 $readonly = $this->readonly ? ' readonly' : '';
136 $columns = $this->columns ? ' cols="' . $this->columns . '"' : '';
137 $rows = $this->rows ? ' rows="' . $this->rows . '"' : '';
138 $required = $this->required ? ' required aria-required="true"' : '';
139 $hint = $hint ? ' placeholder="' . $hint . '"' : '';
140 $autocomplete = !$this->autocomplete ? ' autocomplete="off"' : ' autocomplete="' . $this->autocomplete . '"';
141 $autocomplete = $autocomplete == ' autocomplete="on"' ? '' : $autocomplete;
142 $autofocus = $this->autofocus ? ' autofocus' : '';
143 $spellcheck = $this->spellcheck ? '' : ' spellcheck="false"';
146 $onchange = $this->onchange ? ' onchange="' . $this->onchange . '"' : '';
147 $onclick = $this->onclick ? ' onclick="' . $this->onclick . '"' : '';
150 JHtml::_('jquery.framework');
151 JHtml::_('script', 'system/html5fallback.js', false, true);
153 return '<textarea name="' . $this->name . '" id="' . $this->id . '"' . $columns . $rows . $class
154 . $hint . $disabled . $readonly . $onchange . $onclick . $required . $autocomplete . $autofocus . $spellcheck . ' >'
155 . htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') . '</textarea>';