{% extends "otree/Page.html" %} {% load i18n %} {% load otree static %} {% block global_styles %} {% endblock %} {% block global_scripts %} {% endblock %} {% comment %} Below we replace oTree's body_main block. This accomplishes two things: * Adds a bespoke UEA/LEDR-branded footer; * By default suppresses the obnoxious way in which oTree prints server-side form validation errors. (This can be overridden by specifying suppress_errors=False in the template variables, which restores the oTree default.) Because body_main is not officially publicly exposed by oTree, this would need reviewing for future versions to compare against the default implementation. The implementation below is based on oTree 3.3.x. {% endcomment %} {% block body_main %}
{% if view.remaining_timeout_seconds != None %} {% include 'otree/includes/TimeLimit.html' with form_element_id="form" %} {% endif %} {% if not suppress_errors|default:True and form.errors %}
{% blocktrans trimmed %}Please fix the errors in the form.{% endblocktrans %} {{ form.non_field_errors }}
{% endif %} {% if js_vars|default:False %}{% endif %}
{% csrf_token %}
{% block content %}{% endblock %}

{# need the default:False for projects with old MTurkLandingPage #} {% if view.is_debug|default:False %}
{% include 'otree/includes/debug_info.html' %} {% endif %}
{% endblock body_main %}