<form class="{{cssClass}}" autocomplete="off">
  <header class="sheet-header">
    <img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}" />
    <div class="header-fields">
      <h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
    </div>
  </header>

  {{> systems/fvtt-te-deum/templates/items/partial-item-nav.hbs}}


  {{!-- Sheet Body --}}
  <section class="sheet-body">

    {{> systems/fvtt-te-deum/templates/items/partial-item-description.hbs}}

    <div class="tab details" data-group="primary" data-tab="details">

      <div class="tab" data-group="primary">
        <ul>
          <li class="flexrow">
            <label class="item-name-label-long">Etape</label>
            <select name="system.etape">
              {{selectOptions config.etapesEducation selected=system.etape labelAttr="label" blank=""}}
            </select>
          </li>

          {{#each system.accessible as |access accId|}}
          <li class="flexrow">
            <label class="item-name-label-long">{{getConfigLabel "origineSociale" accId}}</label>
            <input type="checkbox" name="system.accessible.{{accId}}.isaccessible" {{checked access.isaccessible}} />
          </li>
          {{/each}}

          {{#each system.caracteristiques as |carac caracKey|}}
          {{#if carac.valid}}
          <li class="flexrow">
            <label class="item-name-label-long">Caractéristique +1</label>
            <select name="system.caracteristiques.{{caracKey}}.caracId">
              {{selectOptions @root.config.caracteristiques selected=carac.caracId labelAttr="label" blank=""}}
            </select>
          </li>
          {{/if}}
          {{/each}}

          {{#each system.competences as |comp compKey|}}
          {{#if comp.valid}}
          <li class="flexrow">
            <label class="item-name-label-long">Compétence +1</label>
            <select name="system.competences.{{compKey}}.compName">
              {{selectOptions @root.competences selected=comp.compName labelAttr="name" blank=""}}
            </select>
          </li>
          {{/if}}
          {{/each}}

          {{#if hasMultiplier}}
          <li class="flexrow">
            <label class="item-name-label-long">Multiplicateur de cagnotte</label>
            <input type="text" class="item-field-label-short"
              name="system.cagnotteMultiplier" value="{{system.cagnotteMultiplier}}"
              data-dtype="Number" />
          </li>
          {{/if}}

          {{#if hasQuestionnaire}}
          {{#each system.questionnaire as |question quesKey|}}
          <hr>
          <input type="text" class="item-field-label-long2" name="system.questionnaire.{{quesKey}}.question"
            value="{{question.question}}" data-dtype="String" />
          {{#each question.reponses as |reponse repKey|}}
          <li class="flexrow">
            <label class="item-name-label-short item-name-label-text-margin">{{reponse.num}}</label>
            <input type="text" class="item-field-label-long2"
              name="system.questionnaire.{{quesKey}}.reponses.{{repKey}}.reponse" value="{{reponse.reponse}}"
              data-dtype="String" />

            <select class="item-name-label-medium" name="system.questionnaire.{{quesKey}}.reponses.{{repKey}}.compName">
              {{selectOptions @root.competences selected=reponse.compName labelAttr="name" blank=""}}
            </select>

            <label class="item-name-label-short item-name-label-text-margin">+1</label>
          </li>
          {{/each}}

          {{/each}}
          {{/if}}

        </ul>
      </div>
    </div>

  </section>
</form>