<?php // strip fontawesome from input class
$class = $this->class;
if($this->addFontIcon)
{
$class = str_replace(array($this->fontIcon,'fa'),array('',''),$class);
}
?>
<?php $this->extend('form_row'); ?>
<?php $this->block('label'); ?>
<?php if ($this->label): ?>
<label for="ctrl_<?= $this->id ?>"<?php if ($this->class): ?> class="<?= $class ?>"<?php endif; ?>>
<?php if ($this->mandatory): ?>
<span class="invisible"><?= $this->mandatoryField ?> </span><?= $this->label ?><span class="mandatory">*</span>
<?php else: ?>
<?= $this->label ?>
<?php endif; ?>
</label>
<?php endif; ?>
<?php $this->endblock(); ?>
<?php $this->block('field'); ?>
<?php if ($this->hasErrors()): ?>
<p class="error"><?= $this->getErrorAsString() ?></p>
<?php endif; ?>
<?php if ($this->addFontIcon): ?>
<div class="formicon-wrapper">
<span class="input-group-addon"><i class="<?php echo $this->fontIcon; ?>"></i></span>
<?php endif; ?>
<input type="<?= $this->type ?>" name="<?= $this->name ?>" id="ctrl_<?= $this->id ?>" class="text<?php if ($this->hideInput) echo ' password'; ?><?php if ($class) echo ' ' . $class; ?>" value="<?= specialchars($this->value) ?>"<?= $this->getAttributes() ?>>
<?php if ($this->addSubmit): ?>
<input type="submit" id="ctrl_<?= $this->id ?>_submit" class="submit" value="<?= $this->slabel ?>">
<?php endif; ?>
<?php if ($this->addFontIcon): ?>
</div>
<?php endif; ?>
<?php $this->endblock(); ?>