blob: 676902328fb6d798265ee36948dd853881ae79a5 [file] [log] [blame]
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
{% extends "base.html" %}
{% block head %}
{% endblock %}
{% block body %}
<div class="head" onunload="close_instructions()">
<h1>{{tasklistitem.op_task.name}}</h1>
<h3>
Please read all of these instructions before clicking any buttons!
</h3>
<h4>
Click the button below to view instructions for {{tasklistitem.product.name}}. After you have read the instructions, the button below to begin your task will be enabled.
</h4>
<button id="instructions_button" onclick="open_instructions();" class="btn btn-lg btn-warning">
Instructions
</button>
<h4>
Click the blue button in the Task Menu below to launch {{ tasklistitem.product.name }} when ready
</h4>
<h4>
Click the red button in the Task Menu below when you have completed your task
</h4>
<h4>
Please click the green button below to begin your task. This will load the task in this page and you will have {{tasklistitem.userprofile.experiment.task_length}} minutes to answer all questions.
</h4>
<button id="open_task_button" onclick="task_launch();" class="btn btn-lg btn-success">
Begin Task
</button>
</div>
<script>
task_button = document.getElementById("open_task_button");
task_button.disabled = true;
function open_instructions() {
task_button.disabled = false;
parent.instructions_tab = window.open("{{tasklistitem.product.instructions}}", '_blank');
parent.product_button.disabled = false;
}
function task_launch() {
window.location.assign("{{ tasklistitem.op_task.survey_url }}?sid={{ user.userprofile.user_hash }}::{{ tasklistitem.pk }}");
return parent.start_timer();
}
</script>
{% endblock %}