2021-06-26 22:02:00 +02:00
|
|
|
{{!--
|
|
|
|
SPDX-FileCopyrightText: 2021 Johannes Loher
|
|
|
|
SPDX-FileCopyrightText: 2021 Oliver Rümpelein
|
|
|
|
|
|
|
|
SPDX-License-Identifier: MIT
|
|
|
|
--}}
|
|
|
|
|
2021-03-17 20:00:36 +01:00
|
|
|
{{!--
|
|
|
|
!-- 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.
|
2022-05-13 19:12:28 +02:00
|
|
|
!-- @param checkModifiers: A map of all check difficulty modifiers and their translations.
|
2022-05-13 19:23:18 +02:00
|
|
|
!-- @param id: A unique id, used to provided uniqe ids for input elements.
|
2021-03-17 20:00:36 +01:00
|
|
|
--}}
|
|
|
|
<form class="ds4-roll-options">
|
|
|
|
<div class="form-group">
|
2022-05-13 19:23:18 +02:00
|
|
|
<label for="check-target-number-{{id}}">{{localize "DS4.DialogRollOptionsCheckTargetNumberLabel"}}</label>
|
|
|
|
<input id="check-target-number-{{id}}" data-dtype="Number" type="number" name="check-target-number"
|
2021-03-17 20:00:36 +01:00
|
|
|
value="{{checkTargetNumber}}" />
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2022-05-13 19:23:18 +02:00
|
|
|
<label for="check-modifier-{{id}}">{{localize "DS4.DialogRollOptionsCheckModifierLabel"}}</label>
|
2022-05-13 19:12:28 +02:00
|
|
|
<div class="form-fields">
|
2022-05-13 19:23:18 +02:00
|
|
|
<select id="check-modifier-{{id}}" name="check-modifier" data-dtype="String">
|
2022-06-11 12:45:51 +02:00
|
|
|
{{#select "custom"}}
|
2022-05-13 19:12:28 +02:00
|
|
|
{{#each checkModifiers as |checkModifier|}}
|
|
|
|
<option value="{{checkModifier.value}}">{{checkModifier.label}}</option>
|
|
|
|
{{/each}}
|
|
|
|
{{/select}}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-06-11 12:45:51 +02:00
|
|
|
<div class="form-group">
|
2022-05-13 19:23:18 +02:00
|
|
|
<label for="check-modifier-custom-{{id}}">{{localize "DS4.DialogRollOptionsCheckModifierCustomLabel"}}</label>
|
|
|
|
<input id="check-modifier-custom-{{id}}" data-dtype="Number" type="number" name="check-modifier-custom"
|
2022-05-13 19:12:28 +02:00
|
|
|
value="0" />
|
2021-03-17 20:00:36 +01:00
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2022-05-13 19:23:18 +02:00
|
|
|
<label for="maximum-coup-result-{{id}}">{{localize "DS4.DialogRollOptionsMaximumCoupResultLabel"}}</label>
|
|
|
|
<input id="maximum-coup-result-{{id}}" data-dtype="Number" type="number" name="maximum-coup-result"
|
2021-03-17 20:00:36 +01:00
|
|
|
value="{{maximumCoupResult}}" />
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2022-05-13 19:23:18 +02:00
|
|
|
<label for="minimum-fumble-result-{{id}}">{{localize "DS4.DialogRollOptionsMinimumFumbleResultLabel"}}</label>
|
|
|
|
<input id="minimum-fumble-result-{{id}}" data-dtype="Number" type="number" name="minimum-fumble-result"
|
2021-03-17 20:00:36 +01:00
|
|
|
value="{{minimumFumbleResult}}" />
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2022-05-13 19:23:18 +02:00
|
|
|
<label for="roll-mode-{{id}}">{{localize "DS4.DialogRollOptionsRollModeLabel"}}</label>
|
2021-03-17 20:00:36 +01:00
|
|
|
<div class="form-fields">
|
2022-05-13 19:23:18 +02:00
|
|
|
<select id="roll-mode-{{id}}" name="roll-mode" data-dtype="String">
|
2021-03-17 20:00:36 +01:00
|
|
|
{{#select rollMode}}
|
|
|
|
{{#each rollModes as |rollModeValue rollModeKey|}}
|
|
|
|
<option value="{{rollModeKey}}">{{localize rollModeValue}}</option>
|
|
|
|
{{/each}}
|
|
|
|
{{/select}}
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-03-17 19:23:57 +01:00
|
|
|
</form>
|