{% extends "base.html" %} {% load bootstrap %} {% load static %} {% load crispy_forms_filters %} {% load i18n %} {% load formset_tags %} {% block title %} {% if question %} {% translate "Edit question" %} {% else %} {% translate "Create new question" %} {% endif %} {% endblock %} {% block content %}
{% csrf_token %} {{ form|crispy }}
{{ form.choices.management_form }}
{% translate "Choices" %}

{% translate "For single- and multiple choice questions" %}

{% if question %} {% url "questionnaires:question_archive" question.pk as archive_url %} {% blocktranslate trimmed with archive_url=archive_url asvar choice_edit_warning %} You should refrain from editing or removing choices if this question is already in use. Consider creating a new question and archiving this question instead. New choices can always be added safely. {% endblocktranslate %} {% render_alert choice_edit_warning "warning" False %} {% endif %} {{ form.choices|formset_errors }}
    {% for choice_form in form.choices %}
  • {{ choice_form.name|as_crispy_field }}
    {{ choice_form.DELETE }}
  • {% endfor %}
{% translate "Cancel" %}
{% endblock %} {% block javascript %} {% endblock %}