{% extends "package/resource_edit_base.html" %}

{% import 'macros/form.html' as form %}

{% block subtitle %}{{ h.dataset_display_name(pkg) }} - {{ h.resource_display_name(res) }}{% endblock %}

{% block primary_content_inner %}

  {% set action = h.url_for('datastore.dictionary', id=pkg.name, resource_id=res.id) %}

  <form method="post" action="{{ action }}" >
    {% block dictionary_form %}
      {% for field in fields %}
          {% snippet "datastore/snippets/dictionary_form.html", field=field, position=loop.index %}
      {% endfor %}
    {% endblock %}
    <button class="btn btn-primary" name="save" type="submit">
      <i class="fa fa-book"></i> {{ _('Save') }}
    </button>
  </form>
{% endblock %}
