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

{% block title %}
    {% if object.pk %}
	    {% trans 'Edit details' %}
    {% else %}
        {% trans 'New evaluation' %}
    {% endif %}
{% endblock %}

{% block body %}
    <form action="{% if evaluation.pk %}{{ evaluation.get_edit_url }}{% else %}{% url 'trainings:evaluation-create' training_uuid=training.id %}{% endif %}"
          method="post" id="evaluation-form">{% csrf_token %}
        <div class="modal-body">
            {% include 'extras/form.html' with display='block' %}
        </div>
        <div class="modal-footer clearfix">
            <button type="button" class="btn btn-default pull-left" data-dismiss="modal">{% trans 'Cancel' %}</button>
            <input class="btn btn-danger pull-right" type="submit" value="{% trans 'Confirm' %}" />
        </div>
    </form>
    <script type="text/javascript">
        $('#evaluation-form').autoAjaxForm();
    </script>
{% endblock %}
