{% extends "base.html" %}
{% load i18n static %}

{% block main %}
<h1>{% trans "Dummy Template" %}</h1>
<div data-id="dummy-form-wrapper">
    {% for object in objects %}
        {% include "test_app/partials/dummy_form_wrapper.html" %}
    {% endfor %}
</div>

<form method="post" action="{% url "dummy_create_view" %}">
    {% csrf_token %}
    <button type="submit" data-ajax-add-wrapper="[data-id='dummy-form-wrapper']">{% trans "Add object" %}</button>
</form>
{% endblock %}

{% block extra_script %}
<script src="{% static "forms_ajaxified/js/forms_ajaxified.js" %}"></script>
<script>
    $(document).ready(function() {
        $('[data-class="form_ajaxified"]').formsAjaxified();
    });
</script>
{% endblock %}
