37 lines
1.0 KiB
PHP
37 lines
1.0 KiB
PHP
<?
|
|
if ( $this -> params['type'] == 'submit' )
|
|
$out .= '<button ';
|
|
else
|
|
$out = '<a ';
|
|
$out .= 'class="btn ' . $this -> params['class'] . '" ';
|
|
|
|
if ( $this -> params['style'] )
|
|
$out .= 'style="' . $this -> params['style'] . '" ';
|
|
|
|
if ( $this -> params['js'] )
|
|
$out .= 'onclick="' . htmlspecialchars( $this -> params['js'] ) . '" ';
|
|
|
|
if ( $this -> params['url'] )
|
|
$out .= 'href="' . htmlspecialchars( $this -> params['url'] ) . '" ';
|
|
|
|
if ( $this -> params['id'] )
|
|
$out .= 'id="' . $this -> params['id'] . '" ';
|
|
|
|
if ( $this -> params['title'] )
|
|
$out .= 'title="' . htmlspecialchars( $this -> params['title'] ) . '" ';
|
|
|
|
if ( $this -> params['type'] == 'submit' )
|
|
$out .= 'type="submit" ';
|
|
|
|
$out .= '>';
|
|
if ( $this -> params['icon'] )
|
|
$out .= '<i class="fa ' . $this -> params['icon'] . ' mr5"></i>';
|
|
|
|
$out .= $this -> params['text'];
|
|
|
|
if ( $this -> params['type'] == 'submit' )
|
|
$out .= '</button';
|
|
else
|
|
$out .= '</a>';
|
|
|
|
echo $out; |