{% extends "events/base.html" %}
{% load event_tags %}
{% load perm_tags %}
{% load styled_forms %}
{% load i18n %}

{% block title %}{{ block.super }}Addon Add{% 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/events.css">
<script type="text/javascript" src="{{ TINYMCE_JS_URL }}"></script>
{% endblock %}

{% block body %}
<div class="t">
    {% event_nav request.user event %}

    <h1>{% trans "Addon Edit" %}</h1>
    
    <div class="event-wrap">

    	<form action="" method="post" enctype="multipart/form-data">{% csrf_token %}
    	<div class="forms">
			{{ form|styled_form }}
            <h3>Options</h3>
            {{ formset.management_form }}
            {{ formset|styled_form_set }}
			<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 type="text/javascript" src="{{ STATIC_URL }}js/jquery.time.picker.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL }}js/slug.js"></script>
    <script type="text/javascript" src="{{ STATIC_URL }}js/formset.js"></script>
{% endblock %}
