add AttributeChoiceField and use it for Talent

This commit is contained in:
Sven Balzer
2025-05-04 11:04:01 +02:00
parent bc8c7f6a2b
commit a6dc61a924
2 changed files with 25 additions and 35 deletions
+3 -32
View File
@@ -17,38 +17,9 @@
{{>editable-input type="text" name="system.behinderung" value=item.system.behinderung placeholder=(localize "DSA41.talente.label_behinderung")}}
</div>
<div class="grid3 gap">
<select name="system.attribute1">
<option value="courage" {{#if (eq item.system.attribute1 "courage") }}selected{{/if}}>{{localize "DSA41.attributes.long.courage"}} </option>
<option value="cleverness" {{#if (eq item.system.attribute1 "cleverness") }}selected{{/if}}>{{localize "DSA41.attributes.long.cleverness"}} </option>
<option value="intuition" {{#if (eq item.system.attribute1 "intuition") }}selected{{/if}}>{{localize "DSA41.attributes.long.intuition"}} </option>
<option value="charisma" {{#if (eq item.system.attribute1 "charisma") }}selected{{/if}}>{{localize "DSA41.attributes.long.charisma"}} </option>
<option value="dexterity" {{#if (eq item.system.attribute1 "dexterity") }}selected{{/if}}>{{localize "DSA41.attributes.long.dexterity"}} </option>
<option value="agility" {{#if (eq item.system.attribute1 "agility") }}selected{{/if}}>{{localize "DSA41.attributes.long.agility"}} </option>
<option value="constitution" {{#if (eq item.system.attribute1 "constitution")}}selected{{/if}}>{{localize "DSA41.attributes.long.constitution"}}</option>
<option value="strength" {{#if (eq item.system.attribute1 "strength") }}selected{{/if}}>{{localize "DSA41.attributes.long.strength"}} </option>
</select>
<select name="system.attribute2">
<option value="courage" {{#if (eq item.system.attribute2 "courage") }}selected{{/if}}>{{localize "DSA41.attributes.long.courage"}} </option>
<option value="cleverness" {{#if (eq item.system.attribute2 "cleverness") }}selected{{/if}}>{{localize "DSA41.attributes.long.cleverness"}} </option>
<option value="intuition" {{#if (eq item.system.attribute2 "intuition") }}selected{{/if}}>{{localize "DSA41.attributes.long.intuition"}} </option>
<option value="charisma" {{#if (eq item.system.attribute2 "charisma") }}selected{{/if}}>{{localize "DSA41.attributes.long.charisma"}} </option>
<option value="dexterity" {{#if (eq item.system.attribute2 "dexterity") }}selected{{/if}}>{{localize "DSA41.attributes.long.dexterity"}} </option>
<option value="agility" {{#if (eq item.system.attribute2 "agility") }}selected{{/if}}>{{localize "DSA41.attributes.long.agility"}} </option>
<option value="constitution" {{#if (eq item.system.attribute2 "constitution")}}selected{{/if}}>{{localize "DSA41.attributes.long.constitution"}}</option>
<option value="strength" {{#if (eq item.system.attribute2 "strength") }}selected{{/if}}>{{localize "DSA41.attributes.long.strength"}} </option>
</select>
<select name="system.attribute3">
<option value="courage" {{#if (eq item.system.attribute3 "courage") }}selected{{/if}}>{{localize "DSA41.attributes.long.courage"}} </option>
<option value="cleverness" {{#if (eq item.system.attribute3 "cleverness") }}selected{{/if}}>{{localize "DSA41.attributes.long.cleverness"}} </option>
<option value="intuition" {{#if (eq item.system.attribute3 "intuition") }}selected{{/if}}>{{localize "DSA41.attributes.long.intuition"}} </option>
<option value="charisma" {{#if (eq item.system.attribute3 "charisma") }}selected{{/if}}>{{localize "DSA41.attributes.long.charisma"}} </option>
<option value="dexterity" {{#if (eq item.system.attribute3 "dexterity") }}selected{{/if}}>{{localize "DSA41.attributes.long.dexterity"}} </option>
<option value="agility" {{#if (eq item.system.attribute3 "agility") }}selected{{/if}}>{{localize "DSA41.attributes.long.agility"}} </option>
<option value="constitution" {{#if (eq item.system.attribute3 "constitution")}}selected{{/if}}>{{localize "DSA41.attributes.long.constitution"}}</option>
<option value="strength" {{#if (eq item.system.attribute3 "strength") }}selected{{/if}}>{{localize "DSA41.attributes.long.strength"}} </option>
</select>
{{DSA41_input "system.attribute1"}}
{{DSA41_input "system.attribute2"}}
{{DSA41_input "system.attribute3"}}
</div>
</div>
</div>