{% load i18n %}

<form method="post" action="" class="form-horizontal">
    {% csrf_token %}
    {{ snippet_form.non_field_errors }}
    <div style="display: none;">{{ snippet_form.title }}</div>

    <div class="
        control-group
        form-content
        superenter
        {% if is_new %}autofocus{% endif %}
        {% if snippet_form.content.errors %}error{% endif %}
    ">
        {{ snippet_form.content }}
    </div>

    <div class="control-group form-options">
        <div class="form-options-lexer
            {% if snippet_form.lexer.errors %}control-group error{% endif %}">
            <div class="input-append">
                {{ snippet_form.lexer }}
            </div>
            {% for error in snippet_form.lexer.errors %}
            <span class="help-inline">{{ error }}</span>
            {% endfor %}
        </div>
        <div class="form-options-expire">
            {{ snippet_form.expires.errors }}
            <div class="input-prepend">
                <span class="add-on"><i class="icon-trash" title="{% trans "Expire in" %}"></i></span>
                {{ snippet_form.expires }}
            </div>
        </div>
    </div>
    <div class="form-actions">
        <input tabindex="0" type="submit"class="btn btn-primary" value="{% trans "Paste it" %}">
        <span class="shortcut">&#8984;+&#9166; {% trans "or" %} Ctrl+&#9166;</span>
    </div>
</form>
