{% extends 'base.html' %}
{% load i18n %}

{% block subtitle %}
    {% if object.pk %}
	    {% trans 'Edit open question' %}
    {% else %}
        {% trans 'New open question' %}
    {% endif %}
{% endblock %}

{% block actions %}
    <a href="{{ questionnaire.get_detail_url }}" class="btn btn-default">
        {% trans 'Back to the list of questions' %}
    </a>
{% endblock %}

{% block main %}
    <form action="{% if object.pk %}{{ object.get_edit_url }}{% else %}{{ create_url }}{% endif %}" method="post">{% csrf_token %}
        <div class="panel panel-default">
            <div class="panel-body">
                {% include 'cms/extras/form.html' with display='block' %}
            </div>
            <div class="panel-footer clearfix">
                <a class="btn btn-default pull-left" href="{{ questionnaire.get_detail_url }}">{% trans 'Cancel' %}</a>
                <div class="pull-right">
                    <input class="btn btn-primary" type="submit" value="{% trans 'Confirm' %}" />
                    {% include 'questionnaires/_question_add_another.html' %}
                </div>
            </div>
        </div>
    </form>
{% endblock %}
