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

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

{% block body %}
	<form action="{% if object.pk %}{{ presentation.get_edit_url }}{% else %}{% url 'trainings:presentation-create' training_uuid=training.id %}{% endif %}"
		  method="post" enctype="multipart/form-data" id="presentation-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">
        $('#presentation-form').autoAjaxForm();
    </script>
{% endblock %}
