{% extends "otree/Base.html" %}
{% load i18n %}
{% load floppyforms otree_tags %}
{% block internal_scripts %}
{{ block.super }}
<script type="text/javascript" charset="utf-8">
$(function () {
    $('[data-toggle="popover"]').popover()
});
$(function(){
    // if top menu link is clicked inside iframe
    // we exit full mode
    $("#top_menu a").click(function() {
        if ( window.location !== window.parent.location ) {
                window.parent.location.href = $(this).attr("href");
        }
    });
});
</script>
{% endblock %}
{% block content_at_top_of_body %}
{{ block.super }}
{% include 'otree/includes/TopMenu.html' %}
{% endblock %}
{% block content_main %}
<div class="container" style='max-width:970px'>
    <div class="page-header" style="padding-top: 40px">
        <h2>{% block title %}{% endblock %}</h2>
    </div>
    {% block menus %}{% endblock %}
    <div>
        {% if form.errors %}
            <div class="alert alert-danger">
            {% blocktrans %}Please fix the errors in the form.{% endblocktrans %}
            </div>
        {% endif %}

        <form action="" method="post" role="form" class="form" id="form">{% csrf_token %}
            <input type="hidden" value="{{ request.path }}" name="origin_url" />
            {% pageform form using %}
                {% formconfig row using "floppyforms/rows/bootstrap.html" %}
                {% block content %}{% endblock %}
            {% endpageform %}
        </form>
    </div>
    <br/>
</div>
{% endblock %}
<!--end content_main-->
