Files
fvtt-celestopol/templates/npc-main.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

49 lines
1.8 KiB
Handlebars

<div class="npc-main sheet-part">
<header class="sheet-header">
<div class="portrait" data-action="editImage">
<img src="{{actor.img}}" alt="{{actor.name}}" class="actor-portrait">
</div>
<div class="header-fields">
<div class="charname">
{{#if isEditMode}}
<input type="text" name="name" value="{{actor.name}}">
{{else}}
<h1 class="actor-name">{{actor.name}}</h1>
{{/if}}
</div>
<div class="concept-row">
{{#if isEditMode}}
<input type="text" name="system.concept" value="{{system.concept}}"
placeholder="{{localize 'CELESTOPOL.Actor.concept'}}">
{{else}}
<span class="concept-display">{{system.concept}}</span>
{{/if}}
</div>
<div class="header-stats-row">
<div class="header-stat">
<label>{{localize "CELESTOPOL.Actor.initiative"}}</label>
<span>{{system.initiative}}</span>
</div>
<div class="header-stat">
<label>{{localize "CELESTOPOL.Actor.anomaly"}}</label>
{{#if isEditMode}}
<select name="system.anomaly.type">
{{#each anomalyTypes as |atype key|}}
<option value="{{key}}" {{#if (eq key ../system.anomaly.type)}}selected{{/if}}>{{localize atype.label}}</option>
{{/each}}
</select>
<input type="number" name="system.anomaly.value" value="{{system.anomaly.value}}" min="0" max="8" class="small-input">
{{else}}
<span>{{localize system.anomaly.type}} {{#if system.anomaly.value}}({{system.anomaly.value}}){{/if}}</span>
{{/if}}
</div>
</div>
</div>
<div class="header-buttons">
<a data-action="toggleSheet">
<i class="fas {{#if isEditMode}}fa-eye{{else}}fa-edit{{/if}}"></i>
</a>
</div>
</header>
</div>