2024-04-25 21:55:08 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
function checkbox($string, $id, $desc = null, $variable = null, $disabled = false) {
|
|
|
|
$content = '<div class="checkbox'.(!empty($desc) ? '' : ' nodesc').'">';
|
|
|
|
$content .= '<div>';
|
|
|
|
$content .= '<input type="checkbox" name="check-'.$id.'" id="'.$id.'"';
|
|
|
|
$content .= ($variable == true ? ' checked' : null);
|
|
|
|
$content .= ($disabled == false ? null : ' disabled').'>';
|
|
|
|
|
|
|
|
$content .= '<div class="icon-checkbox is-unchecked">'.svgicon('unchecked').'</div>';
|
|
|
|
$content .= '<div class="icon-checkbox is-checked">'.svgicon('checked').'</div>';
|
|
|
|
|
|
|
|
$content .= '<label for="'.$id.'">'.$string.'</label>';
|
|
|
|
$content .= '</div>';
|
|
|
|
|
|
|
|
if(!empty($desc)) {
|
|
|
|
$content .= '<div class="desc">'.$desc.'</div>';
|
|
|
|
}
|
|
|
|
$content .= '</div>';
|
|
|
|
|
|
|
|
return $content;
|
|
|
|
}
|
|
|
|
|
2024-09-23 20:40:19 +02:00
|
|
|
?>
|