This commit is contained in:
WBHarry 2026-04-20 20:54:57 +02:00
parent 60e38e5705
commit 59481d0d77
9 changed files with 52 additions and 21 deletions

View file

@ -5,18 +5,21 @@
</select>
<button data-action="addTierOption" data-tier="{{tab.tier}}" {{#unless selectedOption}}disabled{{/unless}}>{{localize "Add Levelup Option"}}</button>
</div>
{{#with (lookup item.system.levelupOptionTiers tab.tier)}}
{{#with (lookup levelupOptionTiers tab.tier)}}
{{#unless (empty this)}}
{{#each this as |option key|}}
<fieldset>
<legend><a data-action="removeTierOption" data-tier="{{../../tab.tier}}" data-key="{{key}}"><i class="fa-solid fa-trash"></i></a></legend>
<div class="tier-container">
{{formGroup @root.fields.label value=option.label name=(concat "system.levelOptionTiers." ../../tab.tier "." key ".label") localize=true }}
{{formGroup @root.fields.type value=option.type name=(concat "system.levelOptionTiers." ../../tab.tier "." key ".type") localize=true }}
<div class="two-columns even">
{{formGroup @root.fields.checkboxSelections value=option.checkboxSelections name=(concat "system.levelOptionTiers." ../../tab.tier "." key ".checkboxSelections") localize=true }}
{{formGroup @root.fields.minCost value=option.minCost name=(concat "system.levelOptionTiers." ../../tab.tier "." key ".minCost") localize=true }}
{{formGroup @root.fields.label value=option.label name=(concat "system.levelupOptionTiers." ../../tab.tier "." key ".label") localize=true }}
{{formGroup @root.fields.type value=option.type name=(concat "system.levelupOptionTiers." ../../tab.tier "." key ".type") localize=true }}
<div class="nest-inputs">
{{formGroup @root.fields.checkboxSelections value=option.checkboxSelections name=(concat "system.levelupOptionTiers." ../../tab.tier "." key ".checkboxSelections") localize=true }}
{{formGroup @root.fields.minCost value=option.minCost name=(concat "system.levelupOptionTiers." ../../tab.tier "." key ".minCost") localize=true }}
{{#if option.typeData}}
{{formGroup @root.fields.subType value=option.subType name=(concat "system.levelupOptionTiers." ../../tab.tier "." key ".subType") choices=option.typeData.subTypes localize=true }}
{{/if}}
</div>
</div>
</fieldset>

View file

@ -19,12 +19,13 @@
type="checkbox" class="selection-checkbox{{#if (gt this.cost 1)}} multi{{/if}}" {{checked this.selected}} {{#if this.disabled}}disabled{{/if}}
data-tier="{{this.tier}}"
data-level="{{this.level}}"
data-option="{{this.type}}"
data-option="{{this.option}}"
data-checkbox-nr="{{this.checkboxNr}}"
data-cost="{{this.minCost}}"
data-amount="{{this.amount}}"
data-value="{{this.value}}"
data-type="{{this.type}}"
data-sub-type="{{this.subType}}"
/>
{{/each}}
</div>