{% extends "pages/page.html" %}

{% load mezzanine_tags %}

{% block extra_js %}
{{ block.super }}
<script>
$(function() {$('.middle :input:visible:enabled:first').focus();});
</script>
{% endblock %}

{% block main %}
{{ block.super }}
{% if request.GET.sent %}
    {% editable page.form.response %}
    {{ page.form.response|richtext_filter|safe }}
    {% endeditable %}
{% else %}
    {% with page.form as page_form %}
    {% editable page_form.content %}
    {{ page_form.content|richtext_filter|safe }}
    {% endeditable %}
    {% endwith %}
    <form method="post"{% if form.is_multipart %} enctype="multipart/form-data"{% endif %}>
        {% fields_for form %}
        <div class="form-actions">
            <input class="btn btn-primary btn-large" type="submit" value="{{ page.form.button_text }}">
        </div>
    </form>
{% endif %}

{% endblock %}

