{% extends "admin/base_site.html" %}

<!-- LOADING -->
{% load i18n fb_tags fb_csrf admin_static %}

<!-- STYLESHEETS -->
{% block extrastyle %}
    {{ block.super }}
    <link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}" />
    <link rel="stylesheet" type="text/css" href="{{ settings_var.URL_FILEBROWSER_MEDIA }}css/filebrowser.css" />
{% endblock %}

<!-- COLTYPE/BODYCLASS -->
{% block bodyclass %}change-form filebrowser{% if query.pop %} popup{% endif %}{% endblock %}
{% block coltype %}flex{% endblock %}

<!-- BREADCRUMBS -->
{% block breadcrumbs %}{% include "filebrowser/include/breadcrumbs.html" %}{% endblock %}

<!-- CONTENT -->
{% block content %}
<div id="content-main">
    <form action="{% query_string '' 'p' %}" method="post">{% fb_csrf_token %}
        {% if form.errors %}<p class="errornote">{% trans 'Please correct the following errors.' %}</p>{% endif %}
        <fieldset class="module aligned">
            <div class="form-row {% if form.dir_name.errors %}errors{% endif %}">
                <div>
                    <label class="required" for="id_dir_name">{{ form.name.label }}</label>
                    {{ form.name }}
                    {% if form.dir_name.errors %}<ul class="errorlist">{{ form.name.errors }}</ul>{% endif %}
                    <p class="help">
                        {{ form.name.help_text|safe }}
                        {% if settings_var.NORMALIZE_FILENAME or settings_var.CONVERT_FILENAME %}
                            <br />
                            {% if settings_var.NORMALIZE_FILENAME %}
                                {% trans "The Name will be normalized by converting or stripping all non-standard characters." %} <br />
                            {% endif %}
                            {% if settings_var.CONVERT_FILENAME %}
                                {% trans "The Name will be converted to lowercase. Spaces will be replaced with underscores." %}
                            {% endif %}
                        {% endif %}
                    </p>
                </div>
            </div>
        </fieldset>
        <div class="submit-row">
            <input type="submit" value="{% trans 'Submit' %}" class="default" />
        </dib>
    </form>
</div>
{% endblock %}