{% load i18n %}

{% block buttons %}
    <div class="grid-x">
        <div class="large-6 cell">
            <div class="button-group">
                <button type="button" class="button" onclick="submitEvent(this); return false;" id="sendQueryButton">
                    {% trans "Send query" %}
                </button>

                <button type="button" class="button alert" onclick="resetForm(this); return false;"
                        id="resetFormButton">
                    {% trans "Reset form" %}
                </button>

                {% if user_allowed_to_save_forms %}
                    <button type="button"
                            class="button warning"
                            onclick="saveForm(this);return false;" id="saveFormButton">
                        {% trans "Save form" %}
                    </button>
                {% endif %}
            </div>
        </div>
        <div class="large-6 cell">
            <select name="load" onchange="loadForm(this);" id="formsSelector">
                <option value="">{% trans "choose form to load..." %}</option>
                {% for form in saved_forms %}
                    <option value="{{ form.pk }}">{{ form }}</option>
                {% endfor %}
            </select>
        </div>
    </div>
    <p>
        {% if not user_allowed_to_save_forms %}
            {% url "admin:index" as admin_index %}
            {% blocktrans %}
                Please go to <a href="{{ admin_index }}">admin page</a>
                to log in, then come back. You will be able to save created
                forms.
            {% endblocktrans %}
            <br/>
        {% endif %}

    </p>
{% endblock %}
