xref: /webtrees/resources/views/components/checkbox-inline.phtml (revision 1270d2767576ed4a83917769b0ee3613e3b010bf)
1<?php
2
3declare(strict_types=1);
4
5/**
6 * @var bool|null   $checked
7 * @var bool|null   $disabled
8 * @var string|null $id
9 * @var string      $label
10 * @var string      $name
11 * @var string|null $value
12 */
13
14?>
15
16<div class="form-check form-check-inline">
17    <input type="checkbox" class="form-check-input"
18        name="<?= e($name) ?>"
19        id="<?= e($id ?? $name . '-' . ($value ?? '1')) ?>"
20        value="<?= e($value ?? '1') ?>"
21        <?= $checked ?? false ? 'checked="checked"' : '' ?>
22        <?= $disabled ?? false ? 'disabled="disabled"' : '' ?>
23    />
24    <label class="form-check-label" for="<?= e($id ?? $name . '-' . ($value ?? '1')) ?>">
25        <?= $label ?>
26    </label>
27</div>
28