first commit
This commit is contained in:
25
admin/templates/html/button.php
Normal file
25
admin/templates/html/button.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?
|
||||
$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'] ) . '" ';
|
||||
$out .= '>';
|
||||
if ( $this -> params['icon'] )
|
||||
$out .= '<i class="fa ' . $this -> params['icon'] . ' mr5"></i>';
|
||||
$out .= $this -> params['text'];
|
||||
$out .= '</a>';
|
||||
|
||||
echo $out;
|
||||
8
admin/templates/html/form-text.php
Normal file
8
admin/templates/html/form-text.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label"><?= $this -> params['label'];?>:</label>
|
||||
<div class="col-lg-9">
|
||||
<p class="form-control-static" id="<?= $this -> params['id'];?>">
|
||||
<?= $this -> params['text'];?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
70
admin/templates/html/input-icon.php
Normal file
70
admin/templates/html/input-icon.php
Normal file
@@ -0,0 +1,70 @@
|
||||
<?
|
||||
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;
|
||||
36
admin/templates/html/input-switch.php
Normal file
36
admin/templates/html/input-switch.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?
|
||||
if ( $this -> params['label'] )
|
||||
{
|
||||
$out .= '<div class="form-group">';
|
||||
$out .= '<label class="col-lg-3 control-label">' . $this -> params['label'] . ':</label>';
|
||||
$out .= '<div class="col-lg-9 pt5">';
|
||||
}
|
||||
|
||||
$out .= '<div class="switch switch-primary round switch-inline">';
|
||||
$out .= '<input ';
|
||||
|
||||
if ( $this -> params['id'] )
|
||||
$out .= 'id="' . $this -> params['id'] . '" ';
|
||||
else
|
||||
$out .= 'id="' . $this -> params['name'] . '" ';
|
||||
$out .= 'name="' . $this -> params['name'] . '" type="checkbox"';
|
||||
|
||||
if ( $this -> params['checked'] )
|
||||
$out .= 'checked="checked" ';
|
||||
|
||||
$out .= '>';
|
||||
$out .= '<label for="';
|
||||
if ( $this -> params['id'] )
|
||||
$out .= $this -> params['id'];
|
||||
else
|
||||
$out .= $this -> params['name'];
|
||||
$out .= '"></label>';
|
||||
$out .= '</div>';
|
||||
|
||||
if ( $this -> params['label'] )
|
||||
{
|
||||
$out .= '</div>';
|
||||
$out .= '</div>';
|
||||
}
|
||||
|
||||
echo $out;
|
||||
63
admin/templates/html/input.php
Normal file
63
admin/templates/html/input.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?
|
||||
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 .= '<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['style'] )
|
||||
$out .= 'style="' . $this -> params['style'] . '" ';
|
||||
|
||||
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['readonly'] )
|
||||
$out .= 'readonly="readonly" ';
|
||||
|
||||
if ( $this -> params['autocomplete'] == 'off' )
|
||||
$out .= 'autocomplete="off" ';
|
||||
|
||||
if ( is_array( $this -> params['params'] ) and count( $this -> params['params'] ) ) foreach ( $this -> params['params'] as $key => $val )
|
||||
$out .= $key . '="' . $val . '" ';
|
||||
|
||||
$out .= ' />';
|
||||
|
||||
if ( $this -> params['label'] )
|
||||
{
|
||||
$out .= '</div>';
|
||||
$out .= '</div>';
|
||||
}
|
||||
|
||||
echo $out;
|
||||
8
admin/templates/html/panel.php
Normal file
8
admin/templates/html/panel.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<div class="panel <?= $this -> params['class'];?>">
|
||||
<div class="panel-heading">
|
||||
<span class="panel-title"><?= $this -> params['title'];?></span>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<?= $this -> params['content'];?>
|
||||
</div>
|
||||
</div>
|
||||
62
admin/templates/html/select.php
Normal file
62
admin/templates/html/select.php
Normal file
@@ -0,0 +1,62 @@
|
||||
<?
|
||||
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 .= '<select ';
|
||||
|
||||
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'] . '" ';
|
||||
|
||||
if ( $this -> params['style'] )
|
||||
$out .= 'style="' . $this -> params['style'] . '" ';
|
||||
|
||||
if ( $this -> params['readonly'] )
|
||||
$out .= 'readonly="readonly" ';
|
||||
|
||||
if ( is_array( $this -> params['params'] ) and count( $this -> params['params'] ) ) foreach ( $this -> params['params'] as $key => $val )
|
||||
$out .= $key . '="' . $val . '" ';
|
||||
|
||||
$out .= '>';
|
||||
|
||||
if ( $this -> params['empty'] )
|
||||
$out .= '<option value="">--- ' . mb_strtolower( $this -> params['label'], 'UTF-8' ) . ' ---</option>';
|
||||
|
||||
if ( is_array( $this -> params['values'] ) ) foreach ( $this -> params['values'] as $key => $val )
|
||||
{
|
||||
$out .= '<option value="' . $key . '"'; if ( $key == $this -> params['value'] and $this -> params['value'] !== null ) $out .= 'selected="selected"'; $out .='>' . $val . '</option>';
|
||||
}
|
||||
|
||||
$out .= '</select>';
|
||||
|
||||
if ( $this -> params['label'] )
|
||||
{
|
||||
$out .= '</div>';
|
||||
$out .= '</div>';
|
||||
}
|
||||
|
||||
echo $out;
|
||||
52
admin/templates/html/textarea.php
Normal file
52
admin/templates/html/textarea.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?
|
||||
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 .= '<textarea ';
|
||||
|
||||
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'] . '" ';
|
||||
}
|
||||
|
||||
if ( $this -> params['js'] )
|
||||
$out .= 'onchange="' . htmlspecialchars( $this -> params['js'] ) . '" ';
|
||||
|
||||
if ( $this -> params['js_key'] )
|
||||
$out .= 'onkeyup="' . htmlspecialchars( $this -> params['js_key'] ) . '" ';
|
||||
|
||||
$out .= 'name="' . $this -> params['name'] . '" ';
|
||||
|
||||
if ( $this -> params['style'] )
|
||||
$out .= 'style="' . $this -> params['style'] . '" ';
|
||||
|
||||
$out .= ' rows="' . $this -> params['rows'] . '">' . $this -> secureHTML( $this -> params['value'] ) . '</textarea>';
|
||||
|
||||
if ( $this -> params['label'] )
|
||||
{
|
||||
$out .= '</div>';
|
||||
$out .= '</div>';
|
||||
}
|
||||
|
||||
echo $out;
|
||||
Reference in New Issue
Block a user