Files
fvtt-celestopol/templates/character-blessures.hbs
LeRatierBretonnier cff700bd3d Fix roll dialog CSS + JS: template <div> wrapper, moon-section, selectors
- 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>
2026-03-28 17:21:18 +01:00

87 lines
3.4 KiB
Handlebars

<div class="tab blessures {{tab.cssClass}}" data-group="sheet" data-tab="blessures">
{{!-- Blessures --}}
<section class="track-section">
<div class="track-header">
<span class="track-title">{{localize "CELESTOPOL.Track.blessures"}}</span>
<span class="wound-malus">{{localize "CELESTOPOL.Track.currentMalus"}} :
<strong>{{system.blessures.lvl}}</strong>
</span>
</div>
<div class="track-boxes">
{{#each (array "b1" "b2" "b3" "b4" "b5" "b6" "b7" "b8") as |key idx|}}
<div class="track-box {{#if (lookup ../system.blessures key 'checked')}}checked{{/if}}">
<input type="checkbox" name="system.blessures.{{key}}.checked"
{{#if (lookup ../system.blessures key 'checked')}}checked{{/if}}
{{#unless ../isEditable}}disabled{{/unless}}
class="wound-checkbox"
data-track="blessures"
data-index="{{idx}}">
<label class="box-label">{{lookup ../system.blessures key 'malus'}}</label>
</div>
{{/each}}
</div>
<div class="track-level">
<label>{{localize "CELESTOPOL.Track.level"}}</label>
{{#if isEditMode}}
<input type="number" name="system.blessures.lvl" value="{{system.blessures.lvl}}" min="0" max="8">
{{else}}
<span>{{system.blessures.lvl}}</span>
{{/if}}
</div>
</section>
{{!-- Destin --}}
<section class="track-section">
<div class="track-header">
<span class="track-title">{{localize "CELESTOPOL.Track.destin"}}</span>
</div>
<div class="track-boxes destin-boxes">
{{#each (array "d1" "d2" "d3" "d4" "d5" "d6" "d7" "d8") as |key|}}
<div class="track-box destiny {{#if (lookup ../system.destin key 'checked')}}checked{{/if}}">
<input type="checkbox" name="system.destin.{{key}}.checked"
{{#if (lookup ../system.destin key 'checked')}}checked{{/if}}
{{#unless ../isEditable}}disabled{{/unless}}
class="wound-checkbox"
data-track="destin"
data-index="{{@index}}">
</div>
{{/each}}
</div>
<div class="track-level">
<label>{{localize "CELESTOPOL.Track.level"}}</label>
{{#if isEditMode}}
<input type="number" name="system.destin.lvl" value="{{system.destin.lvl}}" min="0" max="8">
{{else}}
<span>{{system.destin.lvl}}</span>
{{/if}}
</div>
</section>
{{!-- Spleen --}}
<section class="track-section">
<div class="track-header">
<span class="track-title">{{localize "CELESTOPOL.Track.spleen"}}</span>
</div>
<div class="track-boxes spleen-boxes">
{{#each (array "s1" "s2" "s3" "s4" "s5" "s6" "s7" "s8") as |key|}}
<div class="track-box spleen {{#if (lookup ../system.spleen key 'checked')}}checked{{/if}}">
<input type="checkbox" name="system.spleen.{{key}}.checked"
{{#if (lookup ../system.spleen key 'checked')}}checked{{/if}}
{{#unless ../isEditable}}disabled{{/unless}}
class="wound-checkbox"
data-track="spleen"
data-index="{{@index}}">
</div>
{{/each}}
</div>
<div class="track-level">
<label>{{localize "CELESTOPOL.Track.level"}}</label>
{{#if isEditMode}}
<input type="number" name="system.spleen.lvl" value="{{system.spleen.lvl}}" min="0" max="8">
{{else}}
<span>{{system.spleen.lvl}}</span>
{{/if}}
</div>
</section>
</div>