<form id="edit-form" class="form-horizontal">
    {% for field in edit_form %}
        <div class="form-group {% if field.errors %}has-error{% endif %}">
            <label for="{{ field.id }}" class="col-sm-2 control-label">{{ field.label }}</label>
            <div class="col-sm-10">
                <input type="text"
                       class="form-control"
                       id="{{ field.id }}"
                       value="{{ field.value }}"
                       name="{{ field.html_name }}">
                {% if field.errors %}
                    {% for error in field.errors %}
                        <span>{{ error }}</span>
                    {% endfor %}
                {% endif %}
            </div>
        </div>
    {% endfor %}
    <input type="hidden" name="directory" value="{{ directory }}">
    <button type="submit"
            data-ajax
            data-url="{% url "files:rename" %}"
            data-method="post"
            data-include=".files input"
            class="btn btn-default">
        Save
    </button>
</form>
<form id="edit-form" class="padding-15">
    {% for field in edit_form %}
        <div class="form-group {% if field.errors %}has-error{% endif %}">
            <label for="{{ field.id }}" class="control-label">{{ field.label }}</label>
            <input type="text"
                   class="form-control"
                   id="{{ field.id }}"
                   value="{{ field.value }}"
                   name="{{ field.html_name }}">
            {% if field.errors %}
                {% for error in field.errors %}
                    <span>{{ error }}</span>
                {% endfor %}
            {% endif %}
        </div>
    {% endfor %}
    <input type="hidden" name="directory" value="{{ directory }}">
    <button type="submit"
            data-ajax
            data-url="{% url "files:rename" %}"
            data-method="post"
            data-include=".files input"
            class="btn btn-default">
        Save
    </button>
</form>
Make form vertical for better support for long filenames
Make form vertical for better support for long filenames
