{% extends "admin/formative/export_submissions.html" %}
{% load i18n %}

{% block cardtitle %}{% trans 'Export Form Submissions' %}{% endblock %}

{% block cardcontent %}
    <p>Options for columns to include:</p>
    <table style="margin-bottom: 1em;">{{ form.as_table }}</table>
{% endblock %}

{% block rowcontent %}
  <div class="col-12 col-sm-9">
    <h4>{% trans 'Forms' %}</h4>
    <ol>
      {{ forms|slice:':20'|unordered_list }}
      {% if forms|length > 20 %}<li>...</li>{% endif %}
    </ol>
    {% for program_form in forms %}
    <input type="hidden" name="_selected_action" value="{{ program_form.pk }}">
    {% endfor %}
  </div>
{% endblock %}

{% block rowsidecontent %}
    <h4>{% trans 'Summary' %}</h4>
    <table class="table" table-striped">
      <tbody>
        <tr>
          <td>{% trans 'Forms' %}</td>
          <td>{{ forms|length }}</td>
        </tr>
      </tbody>
    </table>
{% endblock %}

{% block formcontrols %}
        <input type="hidden" name="action" value="export_ods">
        <div class="form-group">
          <input type="submit" name="_export"
                 class="btn {{ jazzmin_ui.button_classes.danger }}
                        form-control" value="{% trans "Export" %}">
        </div>
        <div class="form-group">
          <a href="#" class="btn {{ jazzmin_ui.button_classes.primary }}
                             cancel-link form-control">
            {% trans "Cancel" %}
          </a>
        </div>
{% endblock %}
