<div class="fields-append hideable">
  {% import 'includes/filters/filter-variables.j2' as vars %}

  <p class="doc">
    Combine multiple HXL datasets.
    {% with key='Append-datasets-filter' %}{% include "includes/help.html" %}{% endwith %}
  </p>

  {% set name='append-exclude-columns%02d' % n %}
  <div id="{{ name }}" class="checkbox">
    <label>
      <input
          type="checkbox"
          name="{{ name }}"
          {% if recipe.args[name] %}
          checked="checked"
          {% endif %}
          />
      Exclude columns not in current dataset.
    </label>
  </div>

  {% set name='append-dataset%02d' % n %}
  <div id="{{ name }}" class="form-group required">
    <label for="{{ name }}">
      Datasets to append
    </label>
    {% for n in range(1, 26) %}
    {% set dataset_name = '%s-%02d' % (name, n) %}
    <input
        class="form-control"
        id="{{ dataset_name }}-field"
        name="{{ dataset_name }}"
        value="{{ recipe.args[dataset_name] }}"
        type="url"
        placeholder="http://example.org/dataset.csv"
        />
    {% with id='#' + dataset_name + '-field' %}
    {% include "includes/selectors.html" %}
    {% endwith %}
    {% endfor %}
  </div>

</div>
