web/*: fix defaults for booleans to use first()

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-04-04 00:36:53 +02:00
parent 46e0571ed0
commit 8a7c414031
23 changed files with 54 additions and 39 deletions

View File

@ -114,7 +114,7 @@ export class PolicyBindingForm extends Form<PolicyBinding> {
<input required name="target" type="hidden" value=${ifDefined(this.binding?.target || this.targetPk)}>
<ak-form-element-horizontal name="enabled">
<div class="pf-c-check">
<input type="checkbox" class="pf-c-check__input" ?checked=${this.binding?.enabled || true}>
<input type="checkbox" class="pf-c-check__input" ?checked=${first(this.binding?.enabled, true)}>
<label class="pf-c-check__label">
${t`Enabled`}
</label>