Merge pull request #27 from Oliver-Akins/GH-21

Make checkbox inputs can default to unchecked
This commit is contained in:
Oliver 2025-07-25 22:46:01 -06:00 committed by GitHub
commit 387f9464b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 1 deletions

View file

@ -33,8 +33,9 @@ export class Ask extends HandlebarsApplicationMixin(ApplicationV2) {
inputs: { inputs: {
template: filePath(`templates/Ask/inputs.hbs`), template: filePath(`templates/Ask/inputs.hbs`),
templates: [ templates: [
filePath(`templates/Ask/inputs/input.hbs`), filePath(`templates/Ask/inputs/checkbox.hbs`),
filePath(`templates/Ask/inputs/details.hbs`), filePath(`templates/Ask/inputs/details.hbs`),
filePath(`templates/Ask/inputs/input.hbs`),
], ],
}, },
controls: { controls: {

View file

@ -0,0 +1,12 @@
<label
for="{{id}}"
>
{{ label }}
</label>
<input
type="checkbox"
id="{{ id }}"
name="{{ key }}"
{{ checked defaultValue }}
{{#if autofocus}}autofocus{{/if}}
>