diff options
| -rw-r--r-- | app/view/formctrl.php | 9 | 
1 files changed, 9 insertions, 0 deletions
| diff --git a/app/view/formctrl.php b/app/view/formctrl.php index 2723791..7433bbb 100644 --- a/app/view/formctrl.php +++ b/app/view/formctrl.php @@ -41,3 +41,12 @@ namespace formctrl;      </div>  <?php } ?> +<?php function checkbox(string $label, string $name, bool $checked = false, bool $disabled = false, ?string $collapse = NULL) : void { ?> + +    <div class="checkbox"> +        <label <?=($collapse ? "data-toggle=\"collapse\" data-target=\"$collapse\"" : "")?>> +            <input type="checkbox" name="input[<?=$name?>]" value="1" <?=($checked ? "checked" : "")?> <?=($disabled ? "disabled" : "")?> /> <?=$label?> +        </label> +    </div> + +<?php } ?> | 
