{% extends "manage.html" %}


{% block subtitle %}List of Questions {% endblock %}

{% block script %}
<script src="{{ URL_ROOT }}/static/yaksh/js/min.js"></script>
<script src="{{ URL_ROOT }}/static/yaksh/js/show_question.js"></script>
<script src="{{ URL_ROOT }}/static/yaksh/js/question_filter.js"></script>
{% endblock %}

{% block manage %}
<form name=frm action="" method="post">
{% csrf_token %}
<div class="row" id="selectors">
    <h5 style="padding-left: 20px;">Filters</h5>
    <div class="span4">
        {{ form.question_type }}
    </div>
    <div class="span4">
        {{ form.language }}
    </div>
    <div class="span4">
        {{ form.marks }}
    </div>
</div>
<br>
<div class="row">
<div class="span16">
    <button class="btn" type="button" onClick='location.replace("{{URL_ROOT}}");'>Clear Filters</button>
</div>
</div>
<br>
<div id="filtered-questions">
{% for i in questions %}
<input type="checkbox" name="question" value="{{ i.id }}">&nbsp;&nbsp;<a href="{{URL_ROOT}}/exam/manage/addquestion/{{ i.id }}">{{ i }}</a><br>
{% endfor %}
</div>
<br>
<button class="btn" type="button" onclick='location.replace("{{URL_ROOT}}/exam/manage/addquestion/");'>Add Question</button>&nbsp;&nbsp;
<button class="btn" type="submit" name='edit' value='edit' onClick="return confirm_edit(frm);">Edit Selected</button>&nbsp;&nbsp;
<button class="btn" type="submit" onClick="return confirm_delete(frm);" name='delete' value='delete'>Delete Selected</button>
</form>
{% endblock %}
