Merge pull request #74 from abc-mikey/replace_select_with_selectoptions

replace {{select}} with {{selectOptions}} for V12
This commit is contained in:
Andrew (Atropos) 2025-03-22 11:52:54 -04:00 committed by GitHub
commit cfb0df1e77
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 10 deletions

View file

@ -41,11 +41,7 @@
<input class="attribute-label" type="text" name="system.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.label" value="{{attr.label}}"
placeholder="{{localize "SIMPLE.AttributeLabel"}}"/>
<select class="attribute-dtype" name="system.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.dtype">
{{#select attr.dtype}}
{{#each ../dtypes as |t|}}
<option value="{{t}}">{{t}}</option>
{{/each}}
{{/select}}
{{selectOptions ../dtypes selected=attr.dtype valueAttr="label" labelAttr="label"}}
</select>
<input type="hidden" name="system.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.group" value="{{attr.group}}" />
<a class="attribute-control" data-action="delete"><i class="fas fa-trash"></i></a>

View file

@ -5,11 +5,7 @@
<input class="group-key" type="text" readonly name="system.groups.{{groupKey}}.key" value="{{groupKey}}" />
<input class="group-label" type="text" name="system.groups.{{groupKey}}.label" value="{{group.label}}" placeholder="Group Label" />
<select class="group-dtype" name="system.groups.{{groupKey}}.dtype">
{{#select group.dtype}}
{{#each ../dtypes as |t|}}
<option value="{{t}}">{{t}}</option>
{{/each}}
{{/select}}
{{selectOptions ../dtypes selected=group.dtype valueAttr="label" labelAttr="label"}}
</select>
<a class="attribute-control" data-action="create" data-group="{{groupKey}}" data-dtype="{{group.dtype}}"><i class="fas fa-plus"></i></a>
<a class="group-control" data-action="delete-group"><i class="fas fa-trash"></i></a>