Make checkbox inputs can default to unchecked
This commit is contained in:
parent
312202191d
commit
27dbc2db47
2 changed files with 14 additions and 1 deletions
|
|
@ -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: {
|
||||||
|
|
|
||||||
12
templates/Ask/inputs/checkbox.hbs
Normal file
12
templates/Ask/inputs/checkbox.hbs
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
<label
|
||||||
|
for="{{id}}"
|
||||||
|
>
|
||||||
|
{{ label }}
|
||||||
|
</label>
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
id="{{ id }}"
|
||||||
|
name="{{ key }}"
|
||||||
|
{{ checked defaultValue }}
|
||||||
|
{{#if autofocus}}autofocus{{/if}}
|
||||||
|
>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue