21 $this->_template=include
'templates/tplInputgroup.php';
27 $span->setTagName(
"span");
29 $span->setContent($text);
30 $span->setClass(
"input-group-addon");
31 if (strtolower($position)===
"left")
32 $this->addonLeft=$span;
34 $this->addonRight=$span;
38 protected function addInput_($input, $label=
"", $position=
"left") {
40 $span->setClass(
"input-group-addon");
41 $input->setProperty(
"aria-label", $label);
42 $span->setContent($input);
46 protected function addButton_($button, $value=
"", $position=
"left") {
48 $span->setClass(
"input-group-btn");
49 $span->setTagName(
"div");
50 $button->setValue($value);
51 $span->setContent($button);
69 $span->setClass(
"input-group-btn");
70 $span->setTagName(
"div");
73 foreach ($items as $item){
76 $bt=
new HtmlButton($this->identifier.
"-bt-".$i++,$item);
84 $span->setContent($buttons);
91 if (strtolower($position)===
"left")
92 $this->addonLeft=$dropdown;
94 $this->addonRight=$dropdown;
103 return $this->
addDropdown_($dropdown, $caption, $position, $items);
111 return $this->
addDropdown_($dropdown, $caption, $position, $items);
122 return $this->
addToMemberCtrl($this->mClass, CssRef::sizes(
"input-group")[$size],CssRef::sizes(
"input-group"));
124 return $this->
addToMemberCtrl($this->mClass, $size, CssRef::sizes(
"input-group"));
129 if (isset($this->addonLeft))
130 $this->addonLeft->run($js);
131 if (isset($this->addonRight))
132 $this->addonRight->run($js);
Twitter Bootstrap HTML Dropdown component.
setBtnCaption($btnCaption)
setMTagName($value)
Define the tagName of the main element.
setTagName($tagName)
Sets the tagName's dropdown.
Default HTML values for Twitter Bootstrap HTML components.
addToMemberCtrl(&$name, $value, $typeCtrl, $separator=" ")
setProperty($name, $value)