<div class="filter-replace-map filter-body">
  {% import 'includes/filters/filter-variables.j2' as vars %}

  <p class="doc">
    {% with key='Replace-data-%28mapping-table%29-filter' %}{% include "includes/help.html" %}{% endwith %}
    Replace values using an external mapping table.
  </p>

  {% set name='replace-map-url%02d' % n %}
  <div class="form-group required">
    <label for="{{ name }}">
      URL of the external mapping table
    </label>
    <input
        id="{{ name }}"
        class="form-control"
        required="required"
        name="{{ name }}"
        value="{{ recipe.args[name] }}"
        type="url"
        placeholder="http://example.org/replacement-map.csv"
        />
    {% with id='#' + name %}
    {% include "includes/selectors.html" %}
    {% endwith %}
  </div>

  {% set name='replace-map-where%02d' % n %}
  <div class="form-group">
    <label for="{{ name }}">
      Replace only in rows matching this query
    </label>
    <input
        id="{{ name }}"
        class="form-control"
        name="{{ name }}"
        value="{{ recipe.args[name] }}"
        pattern="^{{ vars.query_pattern }}$"
        title="{{ vars.query_help }}"
        placeholder="{{ vars.query_placeholder }}"
        />
  </div>

</div>
