<div class="rm-module-column-box">
  <div class="rm-column-title">{{ 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="checkbox">
          <label class="filter-label">{% if filter.filter_id in filter_category %}
            <input type="checkbox" name="filter[]" value="{{ filter.filter_id }}" checked="checked" />
            <span>{{ filter.name }}</span>
            {% else %}
            <input type="checkbox" name="filter[]" value="{{ filter.filter_id }}" />
            <span>{{ filter.name }}</span>
            {% endif %}</label>
        </div>
        {% endfor %}</div>
    </div>
    {% endfor %}</div>
  <div class="panel-footer">
    <button type="button" id="button-filter" class="rm-btn dark">{{ 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>
