{% extends "id_creator/id_creator_base.html" %}
{% load dc_forms %}

{% block form_tag_extra %}class="large_legends inline_radios"{% endblock form_tag_extra %}

{% block form_page_header %}
<h1>Election Organisation</h1>

<p>Enter the organisation(s) holding <strong>{{ all_data.election_type }}</strong>
    on <strong>{{ all_data.date|date }}</strong></p>

{% endblock form_page_header %}


{# {% block form_content %} #}
{# {% for group in form.field_groups %} #}
{# <h2>{{ group.title }}</h2> #}
{# {% for field in group.fields %} #}
{# {{ field|dc_form }} #}
{#  #}
{# {% endfor %} #}

{# {% endfor %} #}
{# {% endblock form_content %} #}

{% extends "id_creator/id_creator_base.html" %}
{% load dc_forms %}

{% block form_tag_extra %}class="large_legends inline_radios"{% endblock form_tag_extra %}

{% block form_page_header %}
<h1>Election Organisation</h1>

<p>Enter the organisation(s) holding <strong>{{ all_data.election_type }}</strong>
    on <strong>{{ all_data.date|date }}</strong></p>

{% endblock form_page_header %}


{% block extra_javascript %}
{{ block.super }}
<script>
fallback.ready(function() {

    $("<button type=button class=button>Mark all seats as contested (can't be undone)</button>")
    .insertAfter(".inline_radios .form-group h2").on('click', function() {
        var container = $(this).parent();
        var this_id = $('h2', container).attr('id');
        $('input[id^="'+ this_id +'"][value=seats_contested]').prop("checked", true);
    });
});

// });

</script>
{% endblock extra_javascript %}

Add button to mark all seats in an area as contested
Add button to mark all seats in an area as contested
