{% extends "jmbo/inclusion_tags/modelbase_detail.html" %} {% load i18n jmbo_template_tags humanize %} {% block content %} {% jmbocache 3600 'object-detail-inclusion' object.id object.modified %} {% if ' {% endif %} {% endif %} {{ object.content|safe }} {% endjmbocache %} {% if can_enter %} {% if competition_entry_form.is_multipart %}
{% else %} {% endif %} {% if object.question %}
{{ object.question }}
{% if object.question_blurb %}{{ object.question_blurb|safe }}{% endif %} {% endif %} {% csrf_token %} {% for field in competition_entry_form.visible_fields %} {% if field.name == "accept_terms" %}
{{ field.errors }} {{ field }} {% url competition-terms object.slug as terms_url %} {% blocktrans %}I accept the terms of this competition{% endblocktrans %}
{% else %}
{{ field.label_tag }} {{ field.errors }}
{{ field.helptext }}
{{ field }}
{% endif %} {% endfor %} {% for field in competition_entry_form.hidden_fields %}{{ field }}{% endfor %}
{% else %} {% jmbocache 3600 'object-detail-inclusion-reason' object.id object.modified reason %}

{% if reason == 'auth_required' %} {% trans "You must be signed in to enter" %}. {% else %} {% if reason == 'max_entries' %} {% trans "You have entered this competition the maximum number of times" %}. {% else %} {% if reason == 'ended' %} {% trans "The competition is closed" %}. {% else %} {% trans "The competition opens" %} {{ object.start_date|naturalday:"D d N 'y" }}. {% endif %} {% endif %} {% endif %}

{% endjmbocache %} {% endif %} {% endblock %}