{% extends "ldt/ldt_raw_base.html" %}
{% load static %}
{% load i18n %} {# form of creation of content #}

{% block js_import %}
	{{ block.super }}
    <script type="text/javascript" src="{% url 'ldt.jsi18n' packages='ldt' %}" ></script>	
    <script type="text/javascript" src='{% static "ldt/js/projectscontents.js" %}'></script>
{% endblock %}

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


{% block js_declaration %}
	<script type="text/javascript">
	$(document).ready(function() {
		resize_modal_window("#error", false);

		$("#close_button").click(function(e) {
			parent.$.nmTop().close();
		});
	});
	</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="reset" name="submit_button" id="submit_button">{% trans "reset_front_project" %}</button></button>
		</form>
	{% endif %}
	</div>
</div>

</div>	
{% endblock %}