{#
 * Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS, 
 <info@champs-libres.coop> / <http://www.champs-libres.coop>
 *
 * This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 *  License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
#}

{% extends "@ChillMain/layout.html.twig" %}

{% block title %}{{ export.title|trans }}{% endblock %}

{% block content %}
    <div class="col-md-10">
    
        {{ include('@ChillMain/Export/_breadcrumb.html.twig') }}
        
        <h1>{{ export.title|trans }}</h1>
        
        <p>{{ export.description|trans }}</p>
    
        {{ form_start(form) }}
        <section class="formatter mb-4">
            <h2>{{ 'Formatter'| trans }}</h2>
            
            {% if form.children.formatter.children|length == 0 %}
                <p>
                    <span class="chill-no-data-statement">{{ "No options availables. Your report is fully configured."|trans }}</span>
                </p>
                {{ form_widget(form.children.formatter) }}
            {% else %}
                <div class="container py-4">
                    {# we always have to render children, to mark as rendered #}
                    {% for input in form.children.formatter.children %}
                        <div class="row">
                            {{ form_row(input) }}
                        </div>
                    {% endfor %}
                </div>
            {% endif %}
        </section>
        
        <div class="mb-4">
            <p>{{ form_widget(form.submit, { 'attr' : { 'class' : 'btn btn-action' }, 'label': 'Generate the report' } ) }}</p>
        </div>
        {{ form_end(form) }}
        
    </div>
{% endblock content %}
