<div class="fields-sort hideable">
  {% import 'includes/filters/filter-variables.j2' as vars %}
  <p class="doc">Sort the records in a HXL dataset (<a target="_blank" href="https://github.com/HXLStandard/libhxl-python/wiki/Sort-rows-filter">help</a>).</p>

  {% set name='sort-tags%02d' % n %}
  <div id="{{ name }}" class="form-group">
    <label for="{{ name }}">Use these tags for sorting.</label>
    <input class="form-control" name="{{ name }}" value="{{ recipe.args[name] }}" pattern="^{{ vars.filters_pattern }}$" title="{{ vars.filters_help }}" placeholder="{{ vars.filters_placeholder }}" />
  </div>
  
  {% set name='sort-reverse%02d' % n %}
  <div id="{{ name }}" class="checkbox">
    <label>
      <input type="checkbox" name="{{ name }}"{% if recipe.args[name] %} checked="checked"{% endif %} />
      Reverse order
    </label>
  </div>

</div>
