searchpromotions_formset.html 1.0 KB

123456789101112131415161718192021222324
  1. {% load i18n wagtailadmin_tags %}
  2. {{ formset.management_form }}
  3. {% trans "Promoted search results" as heading %}
  4. {% panel id="promoted-search-results" heading=heading heading_size="label" classname="w-panel--nested" %}
  5. <div id="id_{{ formset.prefix }}-FORMS">
  6. {% for form in formset.forms %}
  7. {% include "wagtailsearchpromotions/includes/searchpromotion_form.html" with form=form only %}
  8. {% endfor %}
  9. </div>
  10. {% endpanel %}
  11. <script type="text/django-form-template" id="id_{{ formset.prefix }}-EMPTY_FORM_TEMPLATE">
  12. {% escapescript %}
  13. {% include "wagtailsearchpromotions/includes/searchpromotion_form.html" with form=formset.empty_form only %}
  14. {% endescapescript %}
  15. </script>
  16. {# Align with guiding line of the preceding child panel. #}
  17. <div class="w-mb-4 -w-ml-0.5">
  18. <button type="button" class="button button-small button-secondary chooser__choose-button" id="id_{{ formset.prefix }}-ADD" value="Add">
  19. {% icon name="plus-inverse" %}{% trans "Add recommended page" %}
  20. </button>
  21. </div>