c62131ac97
Corrige le bouton 'Ajouter une prédilection' qui ne fonctionnait pas à cause de l'absence de l'attribut data-action requis par AppV2. Modifications: - Ajout de data-action="addPredilection" au bouton d'ajout - Ajout de data-action="deletePredilection" au bouton de suppression - Ajout des attributs name= aux champs de prédilection pour la sauvegarde automatique Cela corrige le problème: le bouton 'Ajouter une prédilection' ne répondait pas lorsqu'on cliquait dessus dans la fiche de compétence. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
81 lines
4.1 KiB
Handlebars
81 lines
4.1 KiB
Handlebars
<section>
|
|
{{> systems/fvtt-mournblade-cyd-2-0/templates/partial-item-header.hbs}}
|
|
|
|
{{> systems/fvtt-mournblade-cyd-2-0/templates/partial-item-nav.hbs}}
|
|
|
|
{{!-- Sheet Body --}}
|
|
<section class="sheet-body">
|
|
|
|
{{> systems/fvtt-mournblade-cyd-2-0/templates/partial-item-description.hbs}}
|
|
|
|
<div class="tab details" data-group="primary" data-tab="details">
|
|
|
|
<ul class="item-list alternate-list">
|
|
<li class="flexrow item">
|
|
<label class="generic-label item-field-label-long">Niveau </label>
|
|
<input type="text" class="padd-right status-small-label color-class-common item-field-label-short"
|
|
name="system.niveau" value="{{system.niveau}}" data-dtype="Number" />
|
|
</li>
|
|
<li class="flexrow item">
|
|
<label class="generic-label item-field-label-long">Attribut 1 </label>
|
|
<select class="status-small-label color-class-common item-field-label-long" type="text"
|
|
name="system.attribut1" value="{{system.attribut1}}" data-dtype="string">
|
|
{{selectOptions config.attributs selected=system.attribut1 }}
|
|
</select>
|
|
</li>
|
|
<li class="flexrow item">
|
|
<label class="generic-label item-field-label-long">Attribut 2 </label>
|
|
<select class="status-small-label color-class-common item-field-label-long" type="text"
|
|
name="system.attribut2" value="{{system.attribut2}}" data-dtype="string">
|
|
<option value="none">{{localize "MNBL.none"}}</option>
|
|
{{selectOptions config.attributs selected=system.attribut2 }}
|
|
</select>
|
|
</li>
|
|
<li class="flexrow item">
|
|
<label class="generic-label item-field-label-long">Attribut 3 </label>
|
|
<select class="status-small-label color-class-common item-field-label-long" type="text"
|
|
name="system.attribut3" value="{{system.attribut3}}" data-dtype="string">
|
|
<option value="none">{{localize "MNBL.none"}}</option>
|
|
{{selectOptions config.attributs selected=system.attribut3 }}
|
|
</select>
|
|
</li>
|
|
|
|
<li class="flexrow item">
|
|
<h3>Prédilections</h3>
|
|
</li>
|
|
<li class="flexrow item">
|
|
<ul>
|
|
{{#each system.predilections as |predilection key|}}
|
|
<li class="prediction-item item flexrow" data-prediction-index="{{key}}">
|
|
<input type="text" class="padd-right color-class-common edit-predilection"
|
|
name="system.predilections.{{key}}.name" value="{{predilection.name}}"
|
|
data-dtype="String" />
|
|
</li>
|
|
<li class="prediction-item item flexrow" data-prediction-index="{{key}}">
|
|
<textarea row="4" type="text" class="padd-right color-class-common edit-predilection-description"
|
|
name="system.predilections.{{key}}.description" data-dtype="String">{{predilection.description}}</textarea>
|
|
</li>
|
|
<li class="prediction-item item flexrow" data-prediction-index="{{key}}">
|
|
<label class="generic-label">Acquise ? <input class="predilection-acquise" type="checkbox"
|
|
name="system.predilections.{{key}}.acquise" {{checked predilection.acquise}} /></label>
|
|
|
|
<label class="generic-label">Maitrise ? <input class="predilection-maitrise" type="checkbox"
|
|
name="system.predilections.{{key}}.maitrise" {{checked predilection.maitrise}} /></label>
|
|
|
|
<label class="generic-label">Utilisée ? <input class="predilection-used" type="checkbox"
|
|
name="system.predilections.{{key}}.used" {{checked predilection.used}} /></label>
|
|
<a class="item-control delete-prediction" title="Supprimer une predilection"
|
|
data-action="deletePredilection" data-predilection-index="{{key}}"><i
|
|
class="fas fa-trash"></i></a>
|
|
</li>
|
|
<hr>
|
|
{{/each}}
|
|
</ul>
|
|
<li class="flexrow item">
|
|
<button id="add-predilection" class="chat-card-button" data-action="addPredilection">Ajouter une prédilection</button>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
</section>
|
|
</section> |