{% extends '@ChillEvent/layout.html.twig' %}

{% import '@ChillPerson/Person/macro.html.twig' as person_macro %}

{% block title 'Participation creation'|trans %}

{% block event_content -%}
<div class="col-10">
    <h1>{{ 'Participation creation'|trans }}</h1>

    <table>
        <tbody>
            <tr>
                <th>{{ 'Associated person'|trans }}</th>
                <td>{{ person_macro.render(participation.person) }}</td>
            </tr>
            <tr>
                <th>{{ 'Associated event'|trans }} </th>
                <td>{{ participation.event.name }}</td>
            </tr>
        </tbody>
    </table>

    {% include '@ChillEvent/Participation/_ignored_participations.html.twig' with ignored_participations %}

    {{ form_start(form) }}

    {{ form_errors(form) }}

    {{ form_row(form.role) }}
    {{ form_row(form.status) }}



    <ul class="record_actions sticky-form-buttons">
        <li class="cancel">
            <a href="{{ path('chill_event__event_show', { 'id' : participation.event.id } ) }}" class="btn btn-cancel">
                {{ 'Back to the event'|trans }}
            </a>
        </li>
        <li>
            {{ form_widget(form.submit, { 'attr' : { 'class' : 'btn btn-create' } } ) }}
        </li>
    </ul>

    {{ form_end(form) }}
</div>
{% endblock %}
