63 lines
2.9 KiB
Handlebars
63 lines
2.9 KiB
Handlebars
{{!--
|
|
SPDX-FileCopyrightText: 2021 Johannes Loher
|
|
SPDX-FileCopyrightText: 2021 Oliver Rümpelein
|
|
|
|
SPDX-License-Identifier: MIT
|
|
--}}
|
|
|
|
{{!--
|
|
!-- Render a roll options dialog. It uses the default form classes of Foundry VTT.
|
|
!-- @param checkTargetNumber: The preselected check target number.
|
|
!-- @param maximumCoupResult: The preselected maximum coup result.
|
|
!-- @param minimumFumbleResult: The preselected minimum fumble result.
|
|
!-- @param rollMode: The preselected roll mode (= chat roll-mode).
|
|
!-- @param rollModes: A map of all roll modes and their i18n keys.
|
|
!-- @param checkModifiers: A map of all check difficulty modifiers and their translations.
|
|
--}}
|
|
<form class="ds4-roll-options">
|
|
<div class="form-group">
|
|
<label for="check-target-number">{{localize "DS4.DialogRollOptionsCheckTargetNumberLabel"}}</label>
|
|
<input id="check-target-number" data-dtype="Number" type="number" name="check-target-number"
|
|
value="{{checkTargetNumber}}" />
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="check-modifier">{{localize "DS4.DialogRollOptionsCheckModifierLabel"}}</label>
|
|
<div class="form-fields">
|
|
{{log checkModifiers}}
|
|
<select id="check-modifier" name="check-modifier" data-dtype="String">
|
|
{{#select "0"}}
|
|
{{#each checkModifiers as |checkModifier|}}
|
|
<option value="{{checkModifier.value}}">{{checkModifier.label}}</option>
|
|
{{/each}}
|
|
{{/select}}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group ds4-hidden">
|
|
<label for="check-modifier-custom">{{localize "DS4.DialogRollOptionsCheckModifierCustomLabel"}}</label>
|
|
<input id="check-modifier-custom" data-dtype="Number" type="number" name="check-modifier-custom"
|
|
value="0" />
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="maximum-coup-result">{{localize "DS4.DialogRollOptionsMaximumCoupResultLabel"}}</label>
|
|
<input id="maximum-coup-result" data-dtype="Number" type="number" name="maximum-coup-result"
|
|
value="{{maximumCoupResult}}" />
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="minimum-fumble-result">{{localize "DS4.DialogRollOptionsMinimumFumbleResultLabel"}}</label>
|
|
<input id="minimum-fumble-result" data-dtype="Number" type="number" name="minimum-fumble-result"
|
|
value="{{minimumFumbleResult}}" />
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="roll-mode">{{localize "DS4.DialogRollOptionsRollModeLabel"}}</label>
|
|
<div class="form-fields">
|
|
<select id="roll-mode" name="roll-mode" data-dtype="String">
|
|
{{#select rollMode}}
|
|
{{#each rollModes as |rollModeValue rollModeKey|}}
|
|
<option value="{{rollModeKey}}">{{localize rollModeValue}}</option>
|
|
{{/each}}
|
|
{{/select}}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</form>
|