{% extends "@ChillPerson/Person/layout.html.twig"  %}

{% set activeRouteKey = 'chill_calendar_calendar_list' %}

{% block title %}{{ 'chill_calendar.Add a document' |trans }}{% endblock title %}

{% set person = calendar_doc.calendar.person %}

{% block js %}
    {{ parent() }}
    {{ encore_entry_script_tags('mod_async_upload') }}
{% endblock %}

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

{% block content %}

    <h1>{{ 'chill_calendar.Add a document'|trans }}</h1>

    {{ form_start(form) }}

    {{ form_row(form.title) }}
    {{ form_row(form.doc) }}

    <ul class="record_actions sticky-form-buttons">
        <li class="cancel">
            <a class="btn btn-cancel" href="{{ chill_return_path_or('chill_calendar_calendar_list_by_person', {'id': person.id }) }}">{{ 'Cancel'|trans|chill_return_path_label }}</a>
        </li>

        <li>
            <button class="btn btn-save" type="submit">{{ 'Save'|trans }}</button>
        </li>
    </ul>

    {{ form_end(form) }}
{% endblock %}
