{# The content of this view will be loaded inside of bootstrap's modal structure -#}
{# p.s: This content will always be written inside the .modal-content div -#}

{# Don't remove this div, jquery wont work without it -#}

{% form_theme form with ['::blocks/form-layout.html.twig'] -%}

<div>
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title">{{ 'Click to call'|trans }} </h4>
    </div>
    <div class="modal-body">
        <div class="modal-info text-center">
            <p>{{ info.subtitle|trans }}</p>
        </div>
        <div class="row">
            <div class="col-sm-6 col-sm-offset-3">
                <form role="form" action="{{ path('listing_clickcall', {'id': id}) }}" method="POST" {{ form_enctype(form) }}
                      class="clicktocall">

                    {{ form_errors(form) }}

                    {{ form_label(form.phone) }}
                    {{ form_widget(form.phone, { 'attr': { 'class': 'form-control'} }) }}
                    {{ form_errors(form.phone) }}
                    <span class="help-block">{{ info.example|trans }}</span>

                    {{ form_label(form.call) }}
                    {{ form_widget(form.call, { 'attr': { 'class': 'form-control btn btn-primary'} }) }}

                    {{ form_widget(form._token) }}
                </form>

                <p><em>{{ info.comment|trans }}</em></p>
            </div>
        </div>
    </div>
    <div class="modal-footer"></div>
</div>
