<h1>According to our records, you're already logged in the {{ area }} under the project named {{ project }}.</h1>
{% if max_capacity_reached %}
    {% if max_capacity_reached.area == area %}
        <h2>However, this area has reached its maximum occupancy</h2>
    {% elif max_capacity_reached %}
        <h2>However, the {{ max_capacity_reached.area }} has reached its maximum occupancy</h2>
    {% elif scheduled_outage_in_progress %}
        <h2>However, a scheduled outage is in effect in the {{ scheduled_outage_in_progress.area }}</h2>
    {% endif %}
{% elif reservation_requirement_failed %}
    <h2>However, you cannot enter since you don't have a current reservation for this area.</h2>
{% endif %}
<h2>Please contact {{ facility_name }} staff if you believe this is an error.</h2>
{% if not reservation_requirement_failed and not max_capacity_reached and not scheduled_outage_in_progress %}
    <h2>What would you like to do?</h2>
    <p>
        <a href="javascript:void(0)"
           role="button"
           class="btn btn-success btn-lg btn-block btn-extra-large"
           onclick="revert_to_default_content()">
            Do nothing and keep me logged in (<span class="countdown">15</span>)
        </a>
    </p>
    {# Don't offer to open the door if there is no interlock #}
    {% if door.interlock %}
        <p>
            <a href="javascript:void(0)"
               role="button"
               class="btn btn-success btn-lg btn-block btn-extra-large"
               onclick="just_open_the_door('{{ badge_number }}', '{{ area.id }}')">
                Open the door and keep me logged in
            </a>
        </p>
    {% endif %}
{% endif %}
<p>
    <a href="javascript:void(0)"
       role="button"
       class="btn btn-success btn-lg btn-block btn-extra-large"
       onclick="exit_area('{{ badge_number }}')">Log out of the {{ area }}</a>
</p>
<script>revert(15);</script>
