aboutsummaryrefslogtreecommitdiff
path: root/templates/datafields/bool.php
blob: 73df34eb0fc0f8882fcb212db099c5379473f476 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<input type="hidden" name="<?= $name ?>[<?= $model->id ?>]" value="0">

<label>
    <span class="datafield_title <?= $model->is_required && $entry->isEditable() ? 'required' : '' ?>">
        <?= htmlReady($model->name) ?>
    </span>

    <? if ($model->description): ?>
        <?= tooltipIcon($model->description) ?>
    <? endif ?>
</label>

<label>
    <input type="checkbox" name="<?= $name ?>[<?= $model->id ?>]"
           value="1" id="<?= $name ?>_<?= $model->id ?>"
           <? if ($value) echo 'checked'; ?>
           <?= !$entry->isEditable() ? "disabled" : "" ?>
           <? if ($model->is_required) echo 'required'; ?>>
</label>