kopparhavet/templates/parts/shared/modifications.html

23 lines
1.3 KiB
HTML
Raw Normal View History

2020-11-28 19:12:19 +01:00
<header class="modifications-header grid-container" style="grid-template-columns: 2fr 1fr auto;">
<span class="modification-modtype">{{localize "MOD.TYPE"}}</span>
<span class="modification-mod">{{localize "MOD.VALUE"}}</span>
<a class="modification-control" data-action="create"><i class="fas fa-plus"></i></a>
</header>
<ol class="modifications-list" style="padding: 0;">
{{#each data.data.modifications as |attr key|}}
2020-11-28 19:12:19 +01:00
<li class="modification grid-container" style="grid-template-columns: 2fr 1fr auto;" data-attribute="{{key}}">
<input class="modification-key" type="text" name="data.modifications.{{key}}.key" value="{{key}}" style="display: none;" />
<select class="modification-modtype" name="data.modifications.{{key}}.modtype">
{{../this.KH.armor_mod_types}}
{{#select attr.modtype}}
{{#if (eq ../item.type "armor")}} {{#each ../this.KH.armor_mod_types as |t|}}
<option value="{{t.value}}">{{localize t.label}}</option>
{{/each}} {{/if}}
{{/select}}
</select>
<input class="modification-value" type="text" name="data.modifications.{{key}}.value" value="{{attr.value}}" data-dtype="Number" placeholder="0" />
<a class="modification-control" data-action="delete"><i class="fas fa-trash"></i></a>
</li>
{{/each}}
</ol>