public function getTemplateVars($values, $fieldNamePostfix = '', $idPrefix = '') { $ret = parent::getTemplateVars($values, $fieldNamePostfix, $idPrefix); $ret['preHtml'] = ''; // damit ein div ausgegeben wird $ret['postHtml'] = '<div class="kwfUp-clear"></div>'; return $ret; }
public function getTemplateVars($values, $namePostfix = '', $idPrefix = '') { $ret = parent::getTemplateVars($values, $namePostfix, $idPrefix); if ($this->getHtml()) { $ret['html'] = $this->getHtml(); } return $ret; }
public function getTemplateVars($values, $fieldNamePostfix = '', $idPrefix = '') { $ret = parent::getTemplateVars($values, $fieldNamePostfix, $idPrefix); $style = ''; if ($this->getWidth()) { $style .= 'width: ' . $this->getWidth() . 'px'; } $ret['preHtml'] = '<div style="' . $style . '">'; $ret['postHtml'] = '</div>'; static $nr; //TODO: das darf so nicht sein -- bei aenderung bitte chris sagen, da css auf $nr basiert $nr++; $ret['id'] = 'Column' . $nr; return $ret; }
public function getTemplateVars($values, $fieldNamePostfix = '', $idPrefix = '') { if ($this->getCheckboxToggle() && $this->_checkboxHiddenField) { $name = $this->_checkboxHiddenField->getFieldName(); if (isset($values[$name])) { $value = $values[$name]; } else { $value = $this->getDefaultValue(); } } $ret = parent::getTemplateVars($values, $fieldNamePostfix, $idPrefix); foreach ($ret['items'] as $k => $i) { if (isset($i['item']) && $i['item'] === $this->_checkboxHiddenField) { unset($ret['items'][$k]); } } $ret['preHtml'] = '<fieldset'; $cssClass = $this->getCls(); if ($this->getCheckboxToggle() && $this->_checkboxHiddenField && !$value) { $cssClass .= ' kwfFormContainerFieldSetCollapsed'; } $ret['preHtml'] .= " class=\"{$cssClass}\""; $ret['preHtml'] .= '>'; if ($this->getTitle()) { $ret['preHtml'] .= "<legend"; if ($this->getLegendAlign()) { $ret['preHtml'] .= " align=\"{$this->getLegendAlign()}\""; } $ret['preHtml'] .= '>'; if ($this->getCheckboxToggle() && $this->_checkboxHiddenField) { $n = $this->_checkboxHiddenField->getFieldName(); $ret['preHtml'] .= "<input type=\"checkbox\" name=\"{$n}\" "; if ($value) { $ret['preHtml'] .= 'checked="checked" '; } $ret['preHtml'] .= "/>"; $ret['preHtml'] .= "<input type=\"hidden\" name=\"{$n}-post\" value=\"1\" />"; } $ret['preHtml'] .= " {$this->getTitle()}</legend>"; } $ret['postHtml'] = '</fieldset>'; return $ret; }