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

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

{% block content %}
{% embed '@ChillMain/CRUD/_edit_content.html.twig' %}
    {% block crud_content_header %}
        <h1>Situation personnelle</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_personal_situation_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>Logement</h2>

        <div id="situation_logement">
        {{ form_row(form.situationLogement) }}
        </div>

        <div id="situation_logement_precision">
            {{ form_row(form.situationLogementPrecision) }}
        </div>

        <h2>Situation familiale</h2>

        {{ form_row(form.enfantACharge) }}
        {{ form_row(form.personMaritalStatus) }}

        <h2>Maitrise de la langue</h2>

        {{ form_row(form.niveauMaitriseLangue) }}

        <h2>Mobilité</h2>

        {{ form_row(form.mobiliteMoyenDeTransport) }}
        {{ form_row(form.vehiculePersonnel) }}
        {{ form_row(form.permisConduire) }}
        {{ form_row(form.mobiliteNotes) }}

        <h2>Situation professionnelle et économique</h2>

        <div id="situation_prof">
            {{ form_row(form.situationProfessionnelle) }}
        </div>

        {{ form_row(form.dateFinDernierEmploi) }}

        <div id="type_contrat">
            {{ form_row(form.typeContrat) }}
        </div>

        <div id="type_contrat_aide">
            {{ form_row(form.typeContratAide) }}
        </div>

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

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

        {{ form_row(form.ressourceDate1Versement) }}
        {{ form_row(form.cPFMontant) }}
        {{ form_row(form.acompteDIF) }}

        <h2>Situation de handicap</h2>

        <div id="handicap_is">
        {{ form_row(form.handicapIs) }}
        </div>

        <div id="handicap_if">
            {{ form_row(form.handicapNotes) }}
            {{ form_row(form.handicapRecommandation) }}
            {{ form_row(form.handicapAccompagnement) }}
        </div>

        <h2>Documents</h2>

        {{ form_row(form.documentCV) }}
        {{ form_row(form.documentAgrementIAE) }}
        {{ form_row(form.documentRQTH) }}
        {{ form_row(form.documentAttestationNEET) }}
        {{ form_row(form.documentCI) }}
        {{ form_row(form.documentTitreSejour) }}
        {{ form_row(form.documentAttestationFiscale) }}
        {{ form_row(form.documentPermis) }}
        {{ form_row(form.documentAttestationCAAF) }}
        {{ form_row(form.documentContraTravail) }}
        {{ form_row(form.documentAttestationFormation) }}
        {{ form_row(form.documentQuittanceLoyer) }}
        {{ form_row(form.documentFactureElectricite) }}
        {{ form_row(form.documentAttestationSecuriteSociale) }}
    {% endblock %}
{% endembed %}
{% endblock %}

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

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