10 defined(
'JPATH_PLATFORM') or die;
30 protected $type =
'Combo';
39 protected function getInput()
45 $attr .= !empty($this->
class) ?
' class=combobox"' . $this->
class . '"' : ' class="combobox"';
46 $attr .= $this->readonly ? ' readonly' : '';
47 $attr .= $this->disabled ? ' disabled' : '';
48 $attr .= !empty($this->size) ? ' size="' . $this->size . '"' : '';
49 $attr .= $this->required ? ' required aria-required="true"' : '';
52 $attr .= $this->onchange ? ' onchange="' . $this->onchange . '"' : '';
55 $options = $this->getOptions();
58 JHtml::_('behavior.combobox');
60 $html[] = '<div class="combobox input-append">';
63 $html[] = '<input type="text" name="' . $this->name . '" id="' . $this->id . '" value="'
64 . htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') . '"' . $attr . ' autocomplete="off" />';
66 $html[] = '<div class="btn-group">';
67 $html[] = '<button type="button" class="btn dropdown-toggle">';
68 $html[] = ' <span class="caret"></span>';
69 $html[] = '</button>';
72 $html[] = '<ul class="dropdown-menu">';
74 foreach ($options as $option)
76 $html[] =
'<li><a href="#">' . $option->text .
'</a></li>';
81 $html[] =
'</div></div>';
83 return implode($html);