{% extends 'base.html' %} {% load i18n template_tools widget_tweaks %} {% block head %} {{ block.super }} {% include "cms/includes/orderable-inline-head.html" %} {% endblock %} {% block subtitle %} {% if object.pk %} {% trans 'Edit question' %} {% else %} {% trans 'New question' %} {% endif %} {% endblock %} {% block actions %} {% trans 'Back to the list of questions' %} {% endblock %} {% block main %}
{% csrf_token %} {{ choices_formset.management_form }}
{% if form.errors or choices_formset.errors %}
{% trans 'Please correct errors below.' %} {% if form.non_field_errors %} {{ form.non_field_errors }} {% endif %}
{% endif %} {% include 'cms/extras/form.html' with display='block' %}

{% trans 'Choices' %}

{% if choices_formset.non_field_errors %}
{{ choices_formset.non_field_errors }}
{% endif %}
{% for choice_form in choices_formset %} {% reducespaces %}
{% endreducespaces %}
{% for field in choice_form.hidden_fields %} {{ field }} {% endfor %} {% if questionnaire.is_scoring %}
{% render_field choice_form.is_valid %}
{% endif %} {% render_field choice_form.label class+='form-control' style="width:950px" placeholder=choice_form.label.label autocomplete="off" %} {% if choice_form.instance and choice_form.instance.pk %} {{ choice_form.DELETE.label }} {{ choice_form.DELETE }} {% endif %}
{% for field in choice_form.visible_fields %}{% if field.name != 'DELETE' %} {% if field.errors %}
{{ field.label }}: {{ field.errors }}
{% endif %} {% endif %}{% endfor %}
{% endfor %}
{% endblock %}