10 defined(
'JPATH_PLATFORM') or die;
33 protected $type =
'Tel';
42 protected function getInput()
45 $hint = $this->translateHint ?
JText::_($this->hint) : $this->hint;
48 $size = !empty($this->size) ?
' size="' . $this->size .
'"' :
'';
49 $maxLength = !empty($this->maxLength) ?
' maxlength="' . $this->maxLength .
'"' :
'';
50 $class = !empty($this->
class) ?
' class="' . $this->
class . '"' : '';
51 $readonly = $this->readonly ? ' readonly' : '';
52 $disabled = $this->disabled ? ' disabled' : '';
53 $required = $this->required ? ' required aria-required="true"' : '';
54 $hint = $hint ? ' placeholder="' . $hint . '"' : '';
55 $autocomplete = !$this->autocomplete ? ' autocomplete="off"' : ' autocomplete="' . $this->autocomplete . '"';
56 $autocomplete = $autocomplete == ' autocomplete="on"' ? '' : $autocomplete;
57 $autofocus = $this->autofocus ? ' autofocus' : '';
58 $spellcheck = $this->spellcheck ? '' : ' spellcheck="false"';
61 $onchange = $this->onchange ? ' onchange="' . $this->onchange . '"' : '';
64 JHtml::_('jquery.framework');
65 JHtml::_('script', 'system/html5fallback.js', false, true);
67 return '<input type="tel" name="' . $this->name . '"' . $class . ' id="' . $this->id . '" value="'
68 . htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') . '"' . $size . $disabled . $readonly
69 . $hint . $autocomplete . $autofocus . $spellcheck . $onchange . $maxLength . $required . ' />';