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

{% block title %}
    {% if training.pk %}
	    {% trans 'Scenario information' %}
    {% else %}
        {% trans 'New scenario' %}
    {% endif %}
{% endblock %}

{% block body %}
    <form action="{% if training.pk %}{{ training.get_edit_url }}{% else %}{% url 'trainings:training-create' %}{% endif %}"
          method="post"
          enctype="multipart/form-data"
          id="training-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-primary pull-right" type="submit" value="{% trans 'Confirm' %}" />
        </div>
    </form>
    <script type="text/javascript">
        $(document).ready(function(){
            $('#training-form').autoAjaxForm();
        });
    </script>
    </form>
{% endblock %}
