summaryrefslogtreecommitdiff
path: root/resources/views/components/checkbox-inline.phtml
diff options
context:
space:
mode:
Diffstat (limited to 'resources/views/components/checkbox-inline.phtml')
-rw-r--r--resources/views/components/checkbox-inline.phtml25
1 files changed, 25 insertions, 0 deletions
diff --git a/resources/views/components/checkbox-inline.phtml b/resources/views/components/checkbox-inline.phtml
new file mode 100644
index 0000000000..9313046d1c
--- /dev/null
+++ b/resources/views/components/checkbox-inline.phtml
@@ -0,0 +1,25 @@
+<?php
+
+/**
+ * @var bool|null $checked
+ * @var bool|null $disabled
+ * @var string|null $id
+ * @var string $label
+ * @var string $name
+ * @var string $value
+ */
+
+?>
+
+<div class="form-check form-check-inline">
+ <input type="checkbox" class="form-check-input"
+ name="<?= e($name) ?>"
+ id="<?= e($id ?? $name . '-' . ($value ?? '1')) ?>"
+ value="<?= e($value ?? '1') ?>"
+ <?= $checked ?? false ? 'checked' : '' ?>
+ <?= $disabled ?? false ? 'disabled' : '' ?>
+ >
+ <label class="form-check-label" for="<?= e($id ?? $name . '-' . ($value ?? '1')) ?>">
+ <?= $label ?>
+ </label>
+</div>