- Remplace <form class='roll-dialog celestopol'> par <div class='roll-dialog-content'>
pour éviter les formulaires HTML imbriqués invalides (DialogV2 a son propre <form>)
- Corrige le sélecteur CSS de .roll-dialog.celestopol vers .application.roll-dialog .roll-dialog-content
- Remplace .form-group.form-moon par .moon-section (classe custom) pour éviter
les conflits avec le CSS grid de FoundryVTT standard-form (label 130px de hauteur)
- Met à jour le script JS inline pour utiliser document.querySelector('.roll-dialog-content')
- Ajoute white-space: nowrap sur le label Destin pour éviter le wrapping sur 3 lignes
- Supprime .application.roll-dialog .window-content padding override (remplacé par dialog-content)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
135 lines
5.7 KiB
Handlebars
135 lines
5.7 KiB
Handlebars
<div class="tab factions {{tab.cssClass}}" data-group="sheet" data-tab="factions">
|
|
<table class="factions-table">
|
|
<thead>
|
|
<tr>
|
|
<th>{{localize "CELESTOPOL.Faction.label"}}</th>
|
|
<th>{{localize "CELESTOPOL.Faction.score"}}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{#each factions as |faction factionId|}}
|
|
<tr class="faction-row" data-faction="{{factionId}}">
|
|
<td class="faction-name">{{localize faction.label}}</td>
|
|
<td class="faction-value">
|
|
<div class="faction-checkboxes-container">
|
|
<div class="faction-checkboxes">
|
|
{{#each (array 1 2 3 4 5 6 7 8 9) as |level|}}
|
|
{{#if @root.isEditMode}}
|
|
<label class="faction-checkbox-wrapper">
|
|
<input type="checkbox" name="system.factions.{{factionId}}.level{{level}}"
|
|
{{#if (lookup (lookup @root.system.factions factionId) (concat 'level' level))}}checked{{/if}}
|
|
class="faction-checkbox"
|
|
data-faction="{{factionId}}"
|
|
data-level="{{level}}">
|
|
</label>
|
|
{{else}}
|
|
<label class="faction-checkbox-wrapper">
|
|
<input type="checkbox"
|
|
{{#if (lookup (lookup @root.system.factions factionId) (concat 'level' level))}}checked{{/if}}
|
|
disabled class="faction-checkbox">
|
|
</label>
|
|
{{/if}}
|
|
{{/each}}
|
|
</div>
|
|
<span class="faction-count">
|
|
{{#if ../isEditMode}}
|
|
<input type="number" name="system.factions.{{factionId}}.value"
|
|
value="{{lookup (lookup ../system.factions factionId) 'value'}}" min="0" max="9" class="faction-value-input">
|
|
{{else}}
|
|
{{lookup (lookup ../system.factions factionId) 'value'}}
|
|
{{/if}}
|
|
</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
{{/each}}
|
|
|
|
{{!-- Factions personnalisées --}}
|
|
<tr class="faction-row custom" data-faction="perso1">
|
|
<td>
|
|
{{#if isEditMode}}
|
|
<input type="text" name="system.factions.perso1.label"
|
|
value="{{system.factions.perso1.label}}"
|
|
placeholder="{{localize 'CELESTOPOL.Faction.custom'}}">
|
|
{{else}}
|
|
<span>{{#if system.factions.perso1.label}}{{system.factions.perso1.label}}{{else}}—{{/if}}</span>
|
|
{{/if}}
|
|
</td>
|
|
<td>
|
|
<div class="faction-checkboxes-container">
|
|
<div class="faction-checkboxes">
|
|
{{#each (array 1 2 3 4 5 6 7 8 9) as |level|}}
|
|
{{#if ../isEditMode}}
|
|
<label class="faction-checkbox-wrapper">
|
|
<input type="checkbox" name="system.factions.perso1.level{{level}}"
|
|
{{#if (lookup ../system.factions.perso1 (concat 'level' level))}}checked{{/if}}
|
|
class="faction-checkbox"
|
|
data-faction="perso1"
|
|
data-level="{{level}}">
|
|
</label>
|
|
{{else}}
|
|
<label class="faction-checkbox-wrapper">
|
|
<input type="checkbox"
|
|
{{#if (lookup ../system.factions.perso1 (concat 'level' level))}}checked{{/if}}
|
|
disabled class="faction-checkbox">
|
|
</label>
|
|
{{/if}}
|
|
{{/each}}
|
|
</div>
|
|
<span class="faction-count">
|
|
{{#if ../isEditMode}}
|
|
<input type="number" name="system.factions.perso1.value"
|
|
value="{{system.factions.perso1.value}}" min="0" max="9" class="faction-value-input">
|
|
{{else}}
|
|
{{system.factions.perso1.value}}
|
|
{{/if}}
|
|
</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="faction-row custom" data-faction="perso2">
|
|
<td>
|
|
{{#if isEditMode}}
|
|
<input type="text" name="system.factions.perso2.label"
|
|
value="{{system.factions.perso2.label}}"
|
|
placeholder="{{localize 'CELESTOPOL.Faction.custom'}}">
|
|
{{else}}
|
|
<span>{{#if system.factions.perso2.label}}{{system.factions.perso2.label}}{{else}}—{{/if}}</span>
|
|
{{/if}}
|
|
</td>
|
|
<td>
|
|
<div class="faction-checkboxes-container">
|
|
<div class="faction-checkboxes">
|
|
{{#each (array 1 2 3 4 5 6 7 8 9) as |level|}}
|
|
{{#if ../isEditMode}}
|
|
<label class="faction-checkbox-wrapper">
|
|
<input type="checkbox" name="system.factions.perso2.level{{level}}"
|
|
{{#if (lookup ../system.factions.perso2 (concat 'level' level))}}checked{{/if}}
|
|
class="faction-checkbox"
|
|
data-faction="perso2"
|
|
data-level="{{level}}">
|
|
</label>
|
|
{{else}}
|
|
<label class="faction-checkbox-wrapper">
|
|
<input type="checkbox"
|
|
{{#if (lookup ../system.factions.perso2 (concat 'level' level))}}checked{{/if}}
|
|
disabled class="faction-checkbox">
|
|
</label>
|
|
{{/if}}
|
|
{{/each}}
|
|
</div>
|
|
<span class="faction-count">
|
|
{{#if ../isEditMode}}
|
|
<input type="number" name="system.factions.perso2.value"
|
|
value="{{system.factions.perso2.value}}" min="0" max="9" class="faction-value-input">
|
|
{{else}}
|
|
{{system.factions.perso2.value}}
|
|
{{/if}}
|
|
</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|