{% extends 'form/base.html' %} {% comment %} config: { # The configuration of the category has_changes: True/False helptext: text or None label: text numbering: text or none } configuration_name: string, content_subcategories_count: int edit_mode: 'edit' # or 'view' overview_url: string (link to go back to overview) subcategories: [ # Passed to the template of the subcategory ( {}, # configuration dictionary, namely containing the template name of the subcategory form, passed on as "config" to the next template [] list of subcategory formsets ), ... ] title: text valid: bool view_url: string (link to view the old version if there is one) {% endcomment %} {% load i18n static %} {% load floppyforms %} {% load change_language %} {% block content %}
{% csrf_token %}
{% if not valid %}

{% trans "There was a problem with your submission. Errors have been highlighted below." %}

{% endif %} {% if config.has_changes %}

{% trans "There is an old version with changes in this section." %} {% trans "View old version" %}

{% endif %}
{% include "form/helptext.html" with helptext=config.helptext helptext_length=config.helptext_length %}
{% for subcategory_config, subcategory_formsets in subcategories %} {% form form using subcategory_config.form_template with config=subcategory_config formsets=subcategory_formsets %} {% endfor %} {% if edit_mode == 'edit' %} {% endif %}
{# Show a warning if a new translation is about to be added. #} {% if show_translation_warning %} {% endif %} {% endblock %} {% block js %} {{ block.super }} {% if show_translation_warning %} {% endif %} {% endblock %} {% block bottom %} {% endblock %} {% block help_tour %} {% endblock %}