<div class="content-block overflow-hidden">
    <div class="pr-column-title pb-3 mb-3 fw-500 dark-text">{{ heading_title }}</div>
    <div class="list-group"> {% for filter_group in filter_groups %} <a class="list-group-item list-group-item-name">{{ filter_group.name }}</a>
        <div class="list-group-item">
            <div id="filter-group{{ filter_group.filter_group_id }}">
                {% for filter in filter_group.filter %}
                    <div class="form-check mb-0">
                        <label class="filter-label form-check-label d-flex align-items-center">
                            {% if filter.filter_id in filter_category %}
                                <input type="checkbox" class="form-check-input" name="filter[]" value="{{ filter.filter_id }}" checked="checked" />
                                {{ filter.name }}
                            {% else %}
                                <input type="checkbox" class="form-check-input" name="filter[]" value="{{ filter.filter_id }}" />
                                {{ filter.name }}
                            {% endif %}
                        </label>
                    </div>
                {% endfor %}
            </div>
        </div>
        {% endfor %}</div>
    <div class="panel-footer mt-3">
        <button type="button" id="button-filter" class="button button-primary br-7 w-100">{{ button_filter }}</button>
    </div>
</div>
<script>
$('#button-filter').on('click', function() {
	filter = [];

	$('input[name^=\'filter\']:checked').each(function(element) {
		filter.push(this.value);
	});

	location = '{{ action }}&filter=' + filter.join(',');
});
</script>
