{% extends "ldt/ldt_raw_base.html" %}

{% load i18n %} {# form of creation of content #}

{% block js_import %}
	{{ block.super }}
{% endblock %}

{% block css_import %}
	{{ block.super }}
	{{ content_form.media.css }}
	<link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/ldt.css" />
	<link rel="stylesheet" href="{{LDT_MEDIA_PREFIX}}css/ldtform.css" />
{% endblock %}


{% block js_declaration %}
	<script type="text/javascript">
	$(document).ready(function() {
		$("#close_button").click(function(e) {
			parent.$.nyroModalRemove();
		});
	});
	</script>
{% endblock %}

{% block body %}
	
<div id="error">
<div class="projectscontentstitle">{% if errors|length > 0 %}{% trans "error" %}{% else %}{% trans "confirm" %}{% endif %}</div>
<div class="error_message">
	{{ message }}
		{% if errors|length > 0 %}
		<ul>
		{% for error_msg in errors %}
			<li>{{ error_msg }}</li>	
		{% endfor %}
		</ul>
	{% endif %}
</div>

<div id="submitcontent" >
	<div id="submitcontent-buttons" >
	{% if errors|length > 0 %}
		<button id="close_button"  value="close">{% trans 'close_error' %}</button> 
	{% else %}
		<form method="post" enctype="application/x-www-form-urlencoded" action="{{ delete_action }}">
			{% csrf_token %}
			<button id="close_button"  value="close">{% trans 'close_cancel' %}</button>
			<button type="submit" value="delete" name="submit_button" id="submit_button">{% trans "do_delete" %}</button>
		</form>
	{% endif %}
	</div>
</div>	
{% endblock %}
