<div class="filter-select filter-body">
  {% import 'includes/filters/filter-variables.j2' as vars %}
  <p class="doc">
    {% with key='Select-rows-filter' %}{% include "includes/help.html" %}{% endwith %}
    Include rows that match <strong>any</strong> of the following queries
  </p>

  {% set name='select-query%02d' % n %}
  <div class="form-group required">
    <label>Queries (e.g. adm1=Bomo)</label>
    {% for n in range(1, 25) %}
    {% set query_name = '%s-%02d' % (name, n) %}
    {% if n == 1 or recipe.args[query_name] %}
    <input class="form-control" name="{{ query_name }}" value="{{ recipe.args[query_name] }}" pattern="^{{ vars.query_pattern }}$" title="{{ vars.query_help }}" placeholder="#tag=value" />
    {% endif %}
    {% endfor %}
    <a onclick="hxl_proxy.ui.addField(this)"><span class="glyphicon glyphicon-plus-sign"></span></a>
  </div>

  {% set name='select-reverse%02d' % n %}
  <div id="{{ name }}" class="checkbox">
    <label>
      <input type="checkbox" name="{{ name }}"{% if recipe.args[name] %} checked="checked"{% endif %} />
      Invert query (include rows that <strong>don't</strong> match any of the queries)
    </label>
  </div>

</div>
