Files
inwestprofil.sk/admin/templates/html/input-icon.php
2025-05-13 22:30:49 +02:00

70 lines
2.2 KiB
PHP

<?
if ( $this -> params['label'] )
{
$out .= '<div class="form-group ';
if ( $this -> params['inline'] )
$out .= 'pl10 pr10';
$out .= '">';
$out .= '<label class="';
if ( !$this -> params['inline'] )
$out .= 'col-lg-3 ';
if ( $this -> params['inline'] )
$out .= 'mb5 ';
$out .= 'control-label">' . $this -> params['label'] . ':</label>';
$out .= '<div class="';
if ( !$this -> params['inline'] )
$out .= 'col-lg-9';
$out .= '">';
}
$out .= '<div class="input-group">';
$out .= '<input ';
$out .= 'type="' . $this -> params['type'] . '" ';
if ( $this -> params['id'] )
$out .= 'id="' . $this -> params['id'] . '" ';
if ( $this -> params['class'] or $this -> params['label'] )
{
if ( $this -> params['label'] )
$out .= 'class="' . $this -> params['class'] . ' form-control" ';
else if ( $this -> params['class'] )
$out .= 'class="' . $this -> params['class'] . '" ';
}
$out .= 'name="' . $this -> params['name'] . '" ';
$out .= 'value="' . $this -> secureHTML( $this -> params['value'] ) . '" ';
if ( $this -> params['js'] )
$out .= 'onchange="' . htmlspecialchars( $this -> params['js'] ) . '" ';
if ( $this -> params['js_key'] )
$out .= 'onkeyup="' . htmlspecialchars( $this -> params['js_key'] ) . '" ';
if ( $this -> params['style'] )
$out .= 'style="' . $this -> params['style'] . '" ';
if ( $this -> params['readonly'] )
$out .= 'readonly="readonly" ';
if ( $this -> params['autocomplete'] == 'off' )
$out .= 'autocomplete="off" ';
$out .= ' />';
$out .= '<span class="input-group-addon btn btn-info ' . $this -> params['icon_class'] . '"';
if ( $this -> params['icon_js'] )
$out .= 'onclick="' . htmlspecialchars( $this -> params['icon_js'] ) . '" ';
$out .= '>';
$out .= $this -> params['icon_content'];
$out .= '</span>';
$out .= '</div>';
if ( $this -> params['label'] )
{
$out .= '</div>';
$out .= '</div>';
}
echo $out;