<section class="filtering content-padding">
    <form action="{{path('manage_form_entry_index', { page : 0 })}}" method="GET" class="form-horizontal clearfix">
        <input type="hidden" name="page" value="0" />
        <div class="row">
            <div class="col-md-4 max-width">
                <div class="form-group row">
                    <label class="col-xs-3 col-md-3 control-label">{{ 'form_entry.index.filter.form.label'|trans({}, 'backend') }}:</label>
                    <div class="col-md-8">
                        <select class="form-control" name="form_id" onchange="this.form.submit();">
                            <option value="">{{ 'form_entry.index.filter.form.empty'|trans({}, 'backend') }}</option>
                            {% for form in forms %}
                                <option value="{{ form.Id }}" {% if admin_list.Params.form_id|default(null) == form.Id %}selected{% endif %}>
                                    {{ form }}
                                </option>
                            {% endfor %}
                        </select>
                    </div>
                </div>
            </div>

            {% if is_granted('ROLE_PERM_WORKFLOW_FORM') and status_waarden|length > 1 %}
                <div class="col-md-4 max-width">
                    <div class=form-group row">
                         <label class="col-xs-3 col-md-3 control-label">{{ 'form_entry.index.filter.form.status'|trans({}, 'backend') }}:</label>
                        <div class="col-md-8">
                            <select class="form-control" name="status" onchange="this.form.submit();">
                                <option value="">{{ 'form_entry.index.filter.form.statusempty'|trans({}, 'backend') }}</option>
                                {% for status_waarde in status_waarden %}
                                    <option value="{{ status_waarde }}" {% if admin_list.Params.status|default(null) == status_waarde %}selected{% endif %}>
                                        {{ status_waarde }}
                                    </option>
                                {% endfor %}
                            </select>

                        </div>
                    </div>
                </div>
            {% endif %}
            
        </div>

        {% if is_granted('ROLE_PERM_WORKFLOW_FORM') and status_waarden|length > 1 %}
            <div class="row">
                <div class="col-md-4 max-width">
                    <div class="form-group row max-width ">
                        <label class="col-xs-4 col-md-3 control-label label-required" for="toegevoegd_gte">{{ 'form_entry.index.filter.form.start_datum'|trans({}, 'backend') }}
                            <span class="required">*</span>
                        </label>
                        <div class="col-md-8">
                            <input type="date" id="toegevoegd_gte" name="toegevoegd_gte" required="required" class="form-control" value="{% if admin_list.Params.toegevoegd_gte is defined %}{{ admin_list.Params.toegevoegd_gte }}{% endif %}"  onchange="this.form.submit();">
                            <div class="form-error-container"></div>
                        </div>
                    </div>
                </div>
                <div class="col-md-4 max-width">
                    <div class="form-group row max-width ">
                        <label class="col-xs-4 col-md-3 control-label label-required" for="toegevoegd_lte">{{ 'form_entry.index.filter.form.eind_datum'|trans({}, 'backend') }}
                            <span class="required">*</span>
                        </label>
                        <div class="col-md-8">
                            <input type="date" id="toegevoegd_lte" name="toegevoegd_lte" required="required" class="form-control" value="{% if admin_list.Params.toegevoegd_lte is defined %}{{ admin_list.Params.toegevoegd_lte }}{% endif %}"  onchange="this.form.submit();">
                            <div class="form-error-container"></div>
                        </div>
                    </div>
                </div>
            </div>
        {% endif %}


    </form>
</section>


