This repository has been archived on 2024-05-29. You can view files and clone it, but cannot push or open issues or pull requests.
fvtt-warhero/templates/partial-actor-stat-block.html
2023-02-07 15:18:00 +01:00

56 lines
2.1 KiB
HTML

<li class="item flexrow list-item item-stat-roll" data-attr-key="{{key}}">
<span class="{{fieldClass}}" name="{{key}}">
<h4 class="{{fieldClass}}">
{{#if roll}}
<i class="fa-solid fa-dice-d20"></i><a class="roll-this stat-margin" data-type="{{path}}" data-key="{{key}}">{{localize stat.label}}</a>
{{else}}
{{localize stat.label}}
{{/if}}
</h4>
</span>
{{#if (eq style "dropdown")}}
<select class="item-field-label-short" type="text" name="system.{{path}}.{{key}}.value" value="{{stat.value}}"
data-dtype="Number" {{#unless @root.editScore}}disabled{{/unless}}>
{{#select stat.value}}
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
{{/select}}
</select>
{{/if}}
{{#if (eq style "edit")}}
<input type="text" class="item-field-label-short " {{#if disabled}}disabled{{/if}} name="system.{{path}}.{{key}}.value" value="{{stat.value}}" data-dtype="Number"/>
{{#if hasmax}}
<input type="text" class="item-field-label-short " name="system.{{path}}.{{key}}.max" value="{{stat.max}}" data-dtype="Number"/>
{{/if}}
{{/if}}
{{#if hassave}}
<span class="item-field-label-short" name="{{key}}">
<h4 class="item-field-label-short">
<i class="fa-solid fa-dice-d20"></i>
<a class="roll-save stat-margin" data-type="{{path}}" data-key="{{key}}">
{{localize "WH.ui.save"}}
</a>
</h4>
</span>
<input type="text" class="item-field-label-short " name="system.{{path}}.{{key}}.save" value="{{stat.save}}" data-dtype="Number"/>
{{/if}}
{{#if islevel}}
<span class="item-field-label-short" name="{{key}}">
<h4 class="item-field-label-short">{{localize "WH.ui.level"}}
</h4>
</span>
<input type="text" disabled class="item-field-label-short " value="{{stat.level}}" data-dtype="Number"/>
{{/if}}
</li>