42 lines
1.8 KiB
PHTML
42 lines
1.8 KiB
PHTML
<?php if($this->element->helper != "formHidden"){ ?>
|
|
<div class="<?= $this->class ?>">
|
|
<label class="control-label" name="<?= $this->element->getName() ?>"><?= $this->element->getLabel() ?></label>
|
|
<div class="controls">
|
|
<?php
|
|
switch ($this->element->helper) {
|
|
case 'formText':
|
|
echo $this->{$this->element->helper}($this->element->getName(),$this->element->getValue(),$this->element->getAttribs());
|
|
break;
|
|
case "formSelect":
|
|
$att = $this->element->getAttribs();
|
|
echo $this->{$this->element->helper}($this->element->getName(),$this->element->getValue(),$this->element->getAttribs(),$att['options']);
|
|
break;
|
|
case "formRadio":
|
|
$att = $this->element->getAttribs();
|
|
echo $this->{$this->element->helper}($this->element->getName(),$this->element->getValue(),$this->element->getAttribs(),$att['options'],$att['listsep']);
|
|
break;
|
|
case "formMultiCheckbox":
|
|
$att = $this->element->getAttribs();
|
|
echo $this->{$this->element->helper}($this->element->getName(),$this->element->getValue(),$this->element->getAttribs(),$att['options'],$att['listsep']);
|
|
break;
|
|
case "formFile":
|
|
echo $this->{$this->element->helper}($this->element->getName(),$this->element->getAttribs());
|
|
break;
|
|
case "formNote":
|
|
$val = $this->element->getValue();
|
|
if(!empty($val))
|
|
{
|
|
echo $this->{$this->element->helper}($this->element->getName(),$val);
|
|
}else{
|
|
echo $this->{$this->element->helper}($this->element->getName());
|
|
}
|
|
default:
|
|
echo $this->{$this->element->helper}($this->element->getName(),$this->element->getValue(),$this->element->getAttribs());
|
|
break;
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
<?php } else {?>
|
|
<?php echo $this->{$this->element->helper}($this->element->getName(),$this->element->getValue(),$this->element->getAttribs()); ?>
|
|
<?php } ?> |