first commit
This commit is contained in:
37
templates/html/button.php
Normal file
37
templates/html/button.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?
|
||||
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;
|
||||
Reference in New Issue
Block a user