{% load i18n %}

<div class="background-form">
    <form action="{% url "jet:add_user_dashboard_module" %}" method="POST" id="add-dashboard-module-form">
        {% csrf_token %}
        <select class="add-dashboard" name="module">
            <option>{% trans "widgets" %}</option>
            <optgroup label="{% trans "available" %}">
                {% for module in available_children %}
                    <option value="{{ forloop.counter0 }}" data-type="available_children">{{ module.title }}</option>
                {% endfor %}
            </optgroup>
            <optgroup label="{% trans "inititals" %}">
                {% for module in children %}
                    <option value="{{ forloop.counter0 }}" data-type="children">{{ module.title }}</option>
                {% endfor %}
            </optgroup>
        </select><a href="#" class="button button-secondary add-dashboard-link" title="{% trans "Add" %}"><span class="icon-add"></span></a>
        <input type="hidden" name="app_label" value="{% if app_label %}{{ app_label }}{% endif %}">
        <input type="hidden" name="type" value="">
    </form>
</div>

