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

{% set activeRouteKey = '' %}

{% block title 'Edit a residential address'|trans %}

{% block content %}
<div class="address-edit">

        <h1>{{ block('title') }}</h1>

        {{ form_start(form) }}

        {{ form_row(form.startDate) }}
        {{ form_row(form.endDate) }}

        {% if residentialAddress.address is not null %}

            {% if form.address is defined %}
                {{ form_row(form.address) }}

                {% block js %}
                {{ encore_entry_script_tags('mod_input_address') }}
                {% endblock %}

                {% block css %}
                    {{ encore_entry_link_tags('mod_input_address') }}
                {% endblock %}
            {% endif %}
        {% endif %}

        {{ form_row(form.comment) }}

        <ul class="record_actions sticky-form-buttons">
            <li class="cancel">
                <a href="{{ chill_path_add_return_path('chill_person_residential_address_list', {'id': person.id}) }}" class="btn btn-cancel">
                    {{ 'Cancel'|trans|chill_return_path_label }}
                </a>
            </li>
            <li>
                <button class="btn btn-update" type="submit">{{ 'Save'|trans }}</button>
            </li>
        </ul>

        {{ form_end(form) }}


</div>
{% endblock %}
