blob: 4c16cbb6eb63d87612f7b91d522104317b1824a8 [file] [log] [blame]
{% extends "experimentpage.html" %}
{% block content %}
<h1>Task details for {{ task.name }}</h1>
<form method="POST" action="{% url 'exp_portal:edit_task' taskpk=task.id %}">
<div class="form-group">
<label for="id_task_name">Task Name</label>
<input class="form-control" name="task_name" id="id_task_name" value="{{task.name}}" size="60" required/>
</div>
<div class="form-group">
<label for="id_task_url">Task URL</label>
<input class="form-control" name="task_url" id="id_task_url" value="{{task.survey_url}}" size="60" required/>
</div>
<div class="form-group">
<label for="id_task_dataset">Challenge Problem</label>
<select class="form-control" name="task_dataset" id="id_task_dataset" required>
{% for dataset in datasets %}
<option value="{{dataset.name}}">{{dataset.name}}</option>
{% endfor %}
</select>
</div>
<div class="form-group">
<label for="id_task_exit_url">Task Exit Survey URL</label>
<input class="form-control" name="task_exit_url" id="id_task_exit_url" value="{{task.exit_url}}" required/>
</div>
<div class="form-group">
<label for="id_task_instructions">Task Instructions</label>
<input class="form-control" name="task_instructions" id="id_task_instructions" value="{{task.instructions}}" required/>
</div>
<div class="checkbox">
<label>
<input type="checkbox" name="task_active" id="id_task_active" {% if task.is_active %}checked{% endif %}/>Active
</label>
</div>
<input class="btn btn-primary" type="submit">Save Changes</button>
{% csrf_token %}
</form>
<script>
document.getElementById("id_task_dataset").value = "{{task.dataset.name}}";
</script>
{% endblock %}