{% extends 'oef/base.html' %}

{% block content %}
<form method="post">{% csrf_token %}
    {{ form }}
    <input type="submit" value="Update">
</form>

{% if object %}
{% if request.user.is_superuser and object.id %}
<a href="{% url 'admin:oef_formats_change' object.id %}">Admin</a>
{% endif %}
    

<h2>Entries</h2>
<ul>
{% for entry, exact in object.get_entries_and_if_exact %}
    <li class="
    {% if exact %}
       exact 
    {% else %}
       not-exact
    {% endif %}
        "><a href='{% url "oef:entry_detail"  entry.pk %}'>{{ entry.exam_code }}</a> / {{ entry.exam_name }}</li>
{% endfor %}
</ul>
{% endif %}
{% endblock content %}


{% block css %}
<style type="text/css">
    .exact {
    }
    .not-exact {
        opacity: 0.5;
    }
</style>
{% endblock %}