22 abstract public function addToProperty($name, $value, $separator=
" ");
23 abstract public function addLabel($caption, $style=
"label-default", $leftSeparator=
" ");
24 abstract public function addContent($content,$before=
false);
33 if ($this->_hasIcon ===
false) {
34 throw new \Exception(
"Input must have an icon for showing a loader, use addIcon before");
48 $field->addToProperty(
"class", $direction .
" labeled");
69 return $this->
labeled(
"", $direction .
" corner", $icon)->toCorner($direction);
82 if (\is_object($action) ===
false) {
83 $actionO=
new HtmlButton(
"action-" . $this->identifier, $action);
85 $actionO->addIcon($icon,
true, $labeled);
87 $field->addToProperty(
"class", $direction .
" action");
88 $field->addContent($actionO, \strstr($direction,
Direction::LEFT) !==
false);
99 $labelO=
new HtmlDropdown(
"dd-".$this->identifier,$label,$items);
100 $labelO->asSelect(
"select-".$this->identifier,
false,
true);
101 return $this->
labeled($labelO,$direction);
105 return $this->
getField()->addToProperty(
"class",
"transparent");
113 public function setName($name){
119 $this->
getField()->addToProperty(
"class",
"fluid");
126 $field->addToProperty(
"class",
"disabled");
134 $id=$field->getIdentifier();
137 return '$("#'.$id.
'").val('.$content.
')';
147 $field->getDataField()->setProperty(
'readonly',
'readonly');
148 $file=
new HtmlInput5($this->identifier.
'-file',
'file');
149 $file->setProperty(
'style',
'display: none!important;');
150 $field->getField()->content[
'file']=$file;
151 $this->
addAction($caption,$direction,$icon,$labeled);