{% extends "psynet_layout.html" %}

{% block body %}
    {{super()}}

    <div style="margin: 15%">
        <p>
            {{ gettext("Resuming experiment ...") }}
        </p>
    </div>
{% endblock %}


{% block scripts %}
{{super()}}
    <script>
        {
            let assignmentId = "{{ assignment_id }}";
            let assignment_id = assignmentId; // Temporary patch that can be removed for Dallinger > v7.6.0
            dallinger.loadParticipant(assignmentId).done(function(resp) {
                window.location = "/timeline?participant_id=" + dallinger.identity.participantId + "&auth_token=" + "{{ auth_token }}";
            }).fail(function(resp) {
                alert("Failed to load the requested session: " + resp);
            });
        }
    </script>
{% endblock %}
