{% extends "projector/project/components/home.html" %}

{% load i18n %}
{% load pagination_tags %}
{% load sorting_tags %}

{% block extra-head %}{{ block.super }}
    <script type="text/javascript">
        $(document).ready(function(){
            $('#id_name').slugify('#id_slug');
        });
    </script>
{% endblock %}

{% block col-single-extra %}
<div class="richtemplates-panel">
    <h5>{% trans "Add component" %}</h5>
    <div class="richtemplates-panel-content">
        {% block components-menu %}{{ block.super }}{% endblock %}
        <form action="." method="post">
            {% csrf_token %}
            <table class="form-table">
                {% include "richtemplates/forms/form.html" %}
            </table>
            <div>
                <input id="id_submit" type="submit" name="submit"
                    value="{% trans "Create component" %}"/>
                <input type="button" onclick="window.location='{% spaceless %}
                    {% url projector_project_components project.author.username project.slug %}
                    {% endspaceless %}'" value="{% trans "Cancel" %}"/>
            </div>
        </form>
    </div>
</div>
{% endblock %}


