swade-mb-helpers/src/templates/powerDialog.html

55 lines
2.0 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<section><!-- vim: set ft=handlebars.html: -->
{{#if extraDescription }}
<div>
{{{extraDescription}}}
</div>
{{/if}}
{{#if basePowerPoints}}
<p><strong>Base Power Points</strong>: {{basePowerPoints}}
{{/if}}
{{#if targets.length}}
<p>
<strong>Targets</strong>:
{{#each targets}}{{#if @index}}, {{/if}}{{{this}}}{{/each}}
{{#if recipients.cost}}
<br>({{#if recipients.epic}}⭐ {{/if}}{{recipients.text}}
{{recipients.cost}}pp each × {{recipients.count}} = {{recipients.total}})
{{/if}}
</p>
{{/if}}
<section class="mbFormFields">
{{#each modifiers}}
<div class="form-group">
{{#unless isRadio}}
<label class="mb{{type}}" for="{{../formId}}-{{id}}"><span class="mbModName">{{#if epic}}⭐
{{/if}}{{name}}</span>{{#if value}}
<span class="mbModValue">({{numberFormat value decimals=0 sign=true}})</span>{{/if}}</label>
{{/unless}}
{{#if isCheckbox}}
<input type="checkbox" name="{{id}}" id="{{../formId}}-{{id}}" {{checked default}} />
{{/if}}
{{#if isText}}
<input name="{{id}}" id="{{formid}}-{{id}}" type="text" value="{{default}}">
{{/if}}
{{#if isNumber}}
<input name="{{id}}" id="{{../formId}}-{{id}}" type="number" value="{{default}}" {{#if step}}step="{{step}}"
{{/if}} {{#if min}}min="{{min}}" {{/if}} {{#if max}}max="{{max}}" {{/if}}>
{{/if}}
{{#if isSelect}}
<select name="{{id}}" id="{{../formId}}-{{id}}">{{selectOptions choices selected=default}}</select>
{{/if}}
{{#if isRadio}}
<fieldset class="mbRadiogroup">
<legend>{{#if epic}}⭐ {{/if}}{{name}}</legend>
{{#each choices}}
<input type="radio" name="{{../id}}" {{checked checked}} id="{{../../formId}}-{{../id}}-{{@key}}"
value="{{@key}}">
<label class="mbradio" for="{{../../formId}}-{{../id}}-{{@key}}">{{text}}</label>
{{/each}}
{{/if}}
</fieldset>
</div>
{{/each}}
</section>
</section>