list_submissions.html 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. {% extends "wagtailadmin/generic/listing_results.html" %}
  2. {% load i18n l10n coderedcms_tags %}
  3. {% block results %}
  4. <form class="w-overflow-auto" data-controller="w-bulk" data-w-bulk-action-inactive-class="w-invisible" action="{% url 'wagtailforms:delete_submissions' form_page.id %}" method="get">
  5. <input type="hidden" value="{{ next_url }}" name="next">
  6. <table class="listing">
  7. <col />
  8. <col />
  9. <col />
  10. <thead>
  11. <tr>
  12. <th><input type="checkbox" data-action="w-bulk#toggleAll" data-w-bulk-target="all" /></th>
  13. {% for heading in data_headings %}
  14. <th id="{{ heading.name }}" class="{% if heading.order %}ordered icon {% if heading.order == 'ascending' %}icon-arrow-up-after{% else %}icon-arrow-down-after{% endif %}{% endif %}">
  15. {% if heading.order %}<a href="?order_by={% if heading.order == 'ascending' %}-{% endif %}{{ heading.name }}">{{ heading.label }}</a>{% else %}{{ heading.label }}{% endif %}
  16. </th>
  17. {% endfor %}
  18. </tr>
  19. </thead>
  20. <tbody>
  21. {% for row in data_rows %}
  22. <tr>
  23. <td>
  24. <input type="checkbox" name="selected-submissions" class="select-submission" value="{{ row.model_id|unlocalize }}" data-action="w-bulk#toggle" data-w-bulk-target="item" />
  25. </td>
  26. {% for cell in row.fields %}
  27. <td>
  28. {% process_form_cell request cell %}
  29. </td>
  30. {% endfor %}
  31. </tr>
  32. {% endfor %}
  33. </tbody>
  34. </table>
  35. <div class="nice-padding">
  36. <button class="button no w-invisible" data-w-bulk-target="action">
  37. {% trans "Delete selected submissions" %}
  38. </button>
  39. </div>
  40. </form>
  41. {% endblock %}
  42. {% block no_results_message %}
  43. <p>
  44. {% blocktrans trimmed with title=form_page.title %}
  45. There have been no submissions of the '{{ title }}' form.
  46. {% endblocktrans %}
  47. </p>
  48. {% endblock %}