{% extends "manage/manage_base.html" %}
{% load i18n %}

{% block section %}add-manufacturer{% endblock %}
{% block left-slot-wrapper %}{% endblock %}

{% block content %}
    <div id="manage-tabs">
        <ul>
            <li class="ui-tabs-nav-item"><a href="#data">{% trans 'Manufacturer' %}</a></li>
        </ul>

        <div id="data">
            <form class="lfc-form"
                  method="post"
                  action="{% url lfs_manufacturer_add_manufacturer %}">
                {% csrf_token %}  
                {% include "manage/lfs_form.html" %}
                <input type="submit" 
                       class="button"
                       name="save" 
                       value="{% trans 'Save' %}" />

                <input type="button"
                       class="button"
                       onclick="window.location='{{ next }}'"
                       value="{% trans 'Cancel' %}" />

                <input type="hidden"
                       name="next"
                       value="{{ next }}" />
            </form>
        </div>
    </div>
    <script>
        $(function() {
            $("#id_name").live("keyup", function() {
                var slug = $("#id_name").val()
                slug = URLify(slug, 200)
                $("#id_slug").val(slug);
            });
        });
    </script>    
{% endblock %}