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

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

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

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

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

<!-- CONTENT -->
{% block content %}
<div id="grp-content-container">
    <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="grp-module aligned">
            <div class="grp-row {% if form.dir_name.errors %}grp-errors{% endif %}">
                <div class="l-2c-fluid l-d-4">
                    <div class="c-1"><label class="required" for="id_dir_name">{{ form.name.label }}</label></div>
                    <div class="c-2">
                        {{ form.name }}
                        {% if form.name.errors %}<ul class="errorlist">{{ form.name.errors }}</ul>{% endif %}
                        <p class="grp-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>
            </div>
        </fieldset>
        <footer class="grp-module grp-submit-row grp-fixed-footer">
            <header style="display:none"><h1>Submit Options</h1></header>
            <ul>
                <li><input type="submit" value="{% trans 'Submit' %}" class="grp-button grp-default" /></li>
            </ul>
        </div>
    </form>
</div>
{% endblock %}
