{% extends 'base.html' %}

{% block title %}Questions for Week {{ week.week }}{% endblock %}

{% block content %}
<form id="diary-form" action="{% url 'diary:record_answers' %}" method="POST">
{% csrf_token %}
<input type="hidden" name="week" value="{{ week.week }}">
{% block questions %}{% endblock %}
</form>
<script>
    has_submitted = false;
    $("#diary-form").steps({
        titleTemplate: '#title#',
        onStepChanging: function(ev, current, next) {
          return $('#diary-form').valid();
        },
        onFinishing: function(ev, current) {
            if (!has_submitted) {
                has_submitted = true;
                $('#diary-form').submit();
            }
        },
        labels: {
            current: '&gt;'
        }
    }).validate();

    $('input[type="submit"]').hide();
</script>
{% endblock %}

{% extends 'base.html' %}

{% block title %}Questions for Week {{ week.week }}{% endblock %}

{% block content %}
<form id="diary-form" action="{% url 'diary:record_answers' %}" method="POST">
{% csrf_token %}
<input type="hidden" name="week" value="{{ week.week }}">
{% block questions %}{% endblock %}

    <h1>6</h1>
    <div class="screen">
        <p>
            That's all the parts for this week's diary. If you want to review them you can use the Previous and Next buttons.
        </p>

        <p>
            If you're happy with your diary then click the Finish button to save it. Once you do this you won't be able to edit it.
        </p>

        <p>
            Thank you for your participation!
        </p>
    </div>
</form>
<script>
    has_submitted = false;
    $("#diary-form").steps({
        titleTemplate: '#title#',
        onStepChanging: function(ev, current, next) {
          return $('#diary-form').valid();
        },
        onFinishing: function(ev, current) {
            if (!has_submitted) {
                has_submitted = true;
                $('#diary-form').submit();
            }
        },
        labels: {
            current: '&gt;'
        }
    }).validate();

    $('input[type="submit"]').hide();
</script>
{% endblock %}

Add a confirm page to the diary screens
Add a confirm page to the diary screens

To try and cut down on people accidentally submitting
