{% block form_date_and_base %}
    <div class="form1 form_content">
        <div class="form_titre">{{ "report:: 1 - Periode" | trans }}</div>
        <div class="control-group">
            <label for="dmin">{{ "report:: Du (date)" | trans }}</label>
            <div class="input-prepend">
                <span class="add-on"></span>
                <input class="dmin" name="dmin" type="text" 
                    value="{{ "-1 month"|date("Y-m-d") }}" size="10"
                    placeholder="{{ "YYYY-MM-DD" | trans }}"
                />
            </div>
        </div>
        <div class="control-group">
            <label for="dmax">{{ "report:: Au (date)" | trans }}</label>
            <div class="input-prepend">
                <span class="add-on"></span>
                <input class="dmax" name="dmax" type="text" 
                    value="{{ "now"|date("Y-m-d") }}" size="10"
                    placeholder="{{ "YYYY-MM-DD" | trans }}"
                />
            </div>
        </div>
    </div>
    <div class="form2 form_content">
        <div class="form_titre">{{ "report:: 2 - Base" | trans }}</div>
        <select class="select_one sbas_select" name="sbas">
            {% for sbas_id,databox in granted_bases %}
                <option 
                    value="{{ sbas_id }}"
                    data-action="{{ path(route, {'sbasId': sbas_id}) }}"
                >{{ databox.name }}</option>
            {% endfor %}
        </select>
    </div>
    <div class="form2 form_content form_content_checkboxes">
        {% if displayCollections == true %}
            <div class="form_titre">
                {{ "report:: 3 - Collections" | trans }}
            </div>
            {% for sbas_id,databox in granted_bases %}
                <div class="collist collist-{{ sbas_id }}">
                    <div class="collist_buttons">
                        <button class="select-all btn btn-mini" data-target_selector="#chkcol-{{ tab }}-{{ sbas_id }} input:checkbox">
                            {% trans %}Select all{% endtrans %}
                        </button>
                        <button class="unselect-all btn btn-mini" data-target_selector="#chkcol-{{ tab }}-{{ sbas_id }} input:checkbox">
                            {% trans %}Deselect all{% endtrans %}
                        </button>
                    </div>

                    <ul id="chkcol-{{ tab }}-{{ sbas_id }}" style="max-height: 150px; overflow-y: auto; overflow-x: hidden;">
                        {% for collection in databox.collections %}
                        <li>
                            <label class="checkbox custom_checkbox_label">
                                <input name="base[]" checked="checked" type="checkbox" value="{{ collection.base_id }}">
                                <span class="custom_checkbox"></span>
                                {{ collection.name }}
                            </label>
                        </li>
                        {% endfor %}
                    </ul>
                </div>
            {% endfor %}
        {% endif %}
    </div>
{% endblock form_date_and_base %}
