xref: /webtrees/resources/views/components/checkbox-inline.phtml (revision 6bd19c8ce39244f770147102c818d9c7d9e13667)
1b6c326d8SGreg Roach<?php
2b6c326d8SGreg Roach
310e06497SGreg Roachdeclare(strict_types=1);
410e06497SGreg Roach
5b6c326d8SGreg Roach/**
6b6c326d8SGreg Roach * @var bool|null   $checked
7b6c326d8SGreg Roach * @var bool|null   $disabled
8b6c326d8SGreg Roach * @var string|null $id
9b6c326d8SGreg Roach * @var string      $label
10b6c326d8SGreg Roach * @var string      $name
11*6bd19c8cSGreg Roach * @var string|null $value
12b6c326d8SGreg Roach */
13b6c326d8SGreg Roach
14b6c326d8SGreg Roach?>
15b6c326d8SGreg Roach
16b6c326d8SGreg Roach<div class="form-check form-check-inline">
17b6c326d8SGreg Roach    <input type="checkbox" class="form-check-input"
18b6c326d8SGreg Roach        name="<?= e($name) ?>"
19b6c326d8SGreg Roach        id="<?= e($id ?? $name . '-' . ($value ?? '1')) ?>"
20b6c326d8SGreg Roach        value="<?= e($value ?? '1') ?>"
214a213054SGreg Roach        <?= $checked ?? false ? 'checked="checked"' : '' ?>
224a213054SGreg Roach        <?= $disabled ?? false ? 'disabled="disabled"' : '' ?>
234a213054SGreg Roach    />
24b6c326d8SGreg Roach    <label class="form-check-label" for="<?= e($id ?? $name . '-' . ($value ?? '1')) ?>">
25b6c326d8SGreg Roach        <?= $label ?>
26b6c326d8SGreg Roach    </label>
27b6c326d8SGreg Roach</div>
28