10 defined(
'JPATH_PLATFORM') or die;
32 protected $type =
'Url';
41 protected function getInput()
44 $hint = $this->translateHint ?
JText::_($this->hint) : $this->hint;
47 $size = !empty($this->size) ?
' size="' . $this->size .
'"' :
'';
48 $maxLength = !empty($this->maxLength) ?
' maxlength="' . $this->maxLength .
'"' :
'';
49 $class = !empty($this->
class) ?
' class="' . $this->
class . '"' : '';
50 $readonly = $this->readonly ? ' readonly' : '';
51 $disabled = $this->disabled ? ' disabled' : '';
52 $required = $this->required ? ' required aria-required="true"' : '';
53 $hint = $hint ? ' placeholder="' . $hint . '"' : '';
54 $autocomplete = !$this->autocomplete ? ' autocomplete="off"' : ' autocomplete="' . $this->autocomplete . '"';
55 $autocomplete = $autocomplete == ' autocomplete="on"' ? '' : $autocomplete;
56 $autofocus = $this->autofocus ? ' autofocus' : '';
57 $spellcheck = $this->spellcheck ? '' : ' spellcheck="false"';
60 $onchange = !empty($this->onchange) ? ' onchange="' . $this->onchange . '"' : '';
63 JHtml::_('jquery.framework');
64 JHtml::_('script', 'system/html5fallback.js', false, true);
66 return '<input type="url" name="' . $this->name . '"' . $class . ' id="' . $this->id . '" value="'
68 . $hint . $autocomplete . $autofocus . $spellcheck . $onchange . $maxLength . $required . ' />';