{% extends "admin/change_form.html" %}
{% load i18n admin_modify adminmedia %}


{% block extrahead %}{{ block.super }}
{% if EDITOR_MEDIA_PATH_HOTLINKING %}
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>
<link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" />
{% else %}
<script type="text/javascript" src="{{ STATIC_URL }}admin/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/jquery-ui-1.8rc3.custom.min.js"></script>
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/smoothness/jquery-ui-1.8rc3.custom.css" />
{% endif %}

<script type="text/javascript" src="{{ EDITOR_MEDIA_PATH }}jquery.alerts.js"></script>
<script type="text/javascript" src="{{ EDITOR_MEDIA_PATH }}itemeditor.js"></script>

<script type="text/javascript">
    var contentblock_init_handlers = [];
</script>

{% for inc in object.feincms_item_editor_includes.head %}{% include inc %}{% endfor %}

<script type="text/javascript">
    {% include "admin/feincms/_messages.html" %}

    function init_contentblocks() {
        for(var k in contentblock_init_handlers)
            contentblock_init_handlers[k]();
    }

    $(function(){
        init_contentblocks();
    });
</script>
{% endblock %}

{% block content %}
<div class="content_main" id="frontend_editor">

<form method="post" action=".">
<div>
{% if is_popup %}<input type="hidden" name="_popup" value="1" />{% endif %}

    <table>
        {{ form }}
    </table>

    <div class="submit-row" >
        <input type="submit" value="{% trans "Save" %}" class="default" name="_save" />
    </div>

</div>
</form>

</div>
{% endblock %}
