10 defined(
'JPATH_PLATFORM') or die;
32 protected $type =
'Email';
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="validate-email ' . $this->
class . '"' : ' class="validate-email"';
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 $multiple = $this->multiple ? ' multiple' : '';
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="email" name="' . $this->name . '"' . $class . ' id="' . $this->id . '" value="'
68 .
JStringPunycode::emailToUTF8($this->value, ENT_COMPAT, 'UTF-8') . '"' . $spellcheck . $size . $disabled . $readonly . $onchange . $autocomplete
69 . $multiple . $maxLength . $hint . $required . $autofocus . ' />';