{% extends "directories/base.html" %}
{% load directory_tags %}
{% load perm_tags %}
{% load styled_forms %}
{% load i18n %}

{% block title %}{% firstof MODULE_DIRECTORIES_LABEL trans 'Directory' %} {% trans "Edit" %}{% endblock %}

{% block extra_head %}
{{ block.super }}
<link rel="stylesheet" href="{{ STATIC_URL }}css/jquery-ui/jquery-ui-1.8.2.custom.css">
<link rel="stylesheet" href="{{ STATIC_URL }}css/timepicker.css" />
<link rel="stylesheet" href="{{ STATIC_URL }}css/directories.css">
<script type="text/javascript" src="{{ TINYMCE_JS_URL }}"></script>
{% endblock %}

{% block body %}
<div class="t">
    {% directory_nav request.user directory %}

    <h1>{% firstof MODULE_DIRECTORIES_LABEL trans 'Directory' %} {% trans "Edit" %}</h1>

    <div class="directory-wrap">

    	<form action="{% url directory.edit directory.pk %}" method="post" enctype="multipart/form-data">{% csrf_token %}
    	<div class="forms">
			{{ form|styled_form }}
        	<input type="submit" value="Save Changes" />
		</div>
        </form>
    </div>
</div>
{% endblock %}

{% block extra_body %}
    {{ block.super }}
    <script type="text/javascript" src="{{ STATIC_URL }}js/global/tinymce.event_handlers.js"></script>
	<script type="text/javascript" src="{{ STATIC_URL }}js/jquery-ui-1.8.2.custom.min.js"></script>
	<script src="{{ STATIC_URL }}js/jquery.time.picker.js" type="text/javascript"></script>
	<script type="text/javascript" src="{{ STATIC_URL }}js/email-verification.js"></script>
	<script type="text/javascript">
		$(".datepicker").datepicker({ dateFormat: 'yy-mm-dd' });
		$('.timepicker').timePicker({
		  show24Hours: false,
		  step: 15
		});
	</script>
{% endblock %}
