{% extends "cms/admin_home.html" %}
{% load crispy_forms_tags sekizai_tags i18n %}

{% block content %}
    <div>

        <h1 class="mt-5 mb-3">{% trans "Add an Event or Reminder (non-Public)" %}</h1>

        {% if form.errors %}
        <div class="alert alert-danger"><strong>{% trans "ERROR" %}:</strong><br />{{ form.errors }}</div>
        {% endif %}

        <form action="" method="post">
            <div class="card">
                <div class="card-body">
                {% crispy form form.helper %}
                {{ formset.management_form }}
                {% for this_form in formset %}
                    <div class="inline {{ formset.prefix }}">
                        {% crispy this_form formset_helper %}
                    </div>
                {% endfor %}
                </div>
            </div>
        </form>
    </div>

{% addtoblock "css" %}
    {{ form.media.css }}
{% endaddtoblock %}
{% addtoblock "js" %}
    {{ form.media.js }}
{% endaddtoblock %}

{% endblock %}