{% extends '@ChillPerson/CRUD/edit.html.twig' %}

{% block css %}
    {{ encore_entry_link_tags('mod_pickentity_type') }}
{% endblock %}

{% block title 'Dispositifs de ' ~ entity.person.firstName ~ ' ' ~ entity.person.lastName %}

{% block content %}
{% embed '@ChillMain/CRUD/_edit_content.html.twig' %}
    {% block crud_content_header %}
        <h1>Dispositifs</h1>
    {% endblock %}

    {# surcharge le block "retour" par un lien vers la page vue #}
    {% block content_form_actions_back %}
        <li class="cancel">
            <a class="btn btn-cancel" href="{{ chill_return_path_or('chill_crud_job_dispositifs_view', { 'person': entity.person.id}) }}">
                {{ 'Cancel'|trans }}
            </a>
        </li>
    {% endblock %}

    {% block content_form_actions_view %}
        {# no view acceptable #}
    {% endblock %}

    {% block content_form_actions_save_and_close %}
       {# save and close does not makes sens #}
    {% endblock %}

    {% block crud_content_form_rows %}
      <h2>Accompagnement</h2>

      <div id="form_accompagnement">
        {{ form_row(form.accompagnement) }}
      </div>

      <div id="form_accompagnement_rqth">
        {{ form_row(form.accompagnementRQTHDate) }}
      </div>

      <div id="form_accompagnement_comment">
        {{ form_row(form.accompagnementComment) }}
      </div>
      {{ form_row(form.prescripteur) }}

      {{ form_row(form.dispositifsNotes) }}

      <h2>Pôle emploi</h2>

      {{ form_row(form.poleEmploiId) }}
      {{ form_row(form.poleEmploiInscriptionDate) }}


      <h2>CAF</h2>

      <div id="cafId">
        {{ form_row(form.cafId) }}
      </div>
      <div id="cafInscriptionDate">
        {{ form_row(form.cafInscriptionDate) }}
      </div>


      <h2>Autres informations</h2>


      {{ form_row(form.cERInscriptionDate) }}
      {{ form_row(form.cERSignataire) }}
      {{ form_row(form.pPAEInscriptionDate) }}
      {{ form_row(form.pPAESignataire) }}

      <div id="neetEligibilite">
        {{ form_row(form.nEETEligibilite) }}
      </div>

      <div id="neetCommissionDate">
        {{ form_row(form.nEETCommissionDate) }}
      </div>

      {{ form_row(form.fSEMaDemarcheCode) }}
      {{ form_row(form.dateContratIEJ) }}
      {{ form_row(form.dateAvenantIEJ) }}
    {% endblock %}
{% endembed %}
{% endblock %}

{% block js %}
    {{ parent() }}
    {{ encore_entry_script_tags('mod_pickentity_type') }}
    <script type="text/javascript" src="{{ asset('build/dispositifs_edit.js') }}"></script>
    <script type="text/javascript">

    </script>
{% endblock js %}
