replace {{select}} handlebars helper with {{selectOptions}} helper due to deprecation warning as of V12

This commit is contained in:
Michael Green 2025-03-15 18:44:24 +01:00
parent a4a29865e0
commit fd077ff9ba
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}}" <input class="attribute-label" type="text" name="system.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.label" value="{{attr.label}}"
placeholder="{{localize "SIMPLE.AttributeLabel"}}"/> placeholder="{{localize "SIMPLE.AttributeLabel"}}"/>
<select class="attribute-dtype" name="system.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.dtype"> <select class="attribute-dtype" name="system.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.dtype">
{{#select attr.dtype}} {{selectOptions ../dtypes selected=attr.dtype valueAttr="label" labelAttr="label"}}
{{#each ../dtypes as |t|}}
<option value="{{t}}">{{t}}</option>
{{/each}}
{{/select}}
</select> </select>
<input type="hidden" name="system.attributes.{{#if attr.group}}{{attr.group}}.{{/if}}{{key}}.group" value="{{attr.group}}" /> <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> <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-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" /> <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 class="group-dtype" name="system.groups.{{groupKey}}.dtype">
{{#select group.dtype}} {{selectOptions ../dtypes selected=group.dtype valueAttr="label" labelAttr="label"}}
{{#each ../dtypes as |t|}}
<option value="{{t}}">{{t}}</option>
{{/each}}
{{/select}}
</select> </select>
<a class="attribute-control" data-action="create" data-group="{{groupKey}}" data-dtype="{{group.dtype}}"><i class="fas fa-plus"></i></a> <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> <a class="group-control" data-action="delete-group"><i class="fas fa-trash"></i></a>