{% extends 'dashboard/offers/step_form.html' %}


{% load i18n %}

{% block progress %}
    {% include 'dashboard/offers/progress.html' with step=2 %}
{% endblock %}

{% block form_fields %}
    <span class="error-block">{{ form.non_field_errors }}</span>

    {% if form.fields.custom_benefit.choices %}
        <h4>{% trans "Build a new incentive" %}</h4>
    {% endif %}
	{% include "partials/form_field.html" with field=form.range %}
	<p>{% trans "Ranges can be created and edited from within the " %}
		<a href="{% url 'dashboard:range-list' %}">{% trans "range dashboard" %}</a>.</p>
	{% include "partials/form_field.html" with field=form.type %}
	{% include "partials/form_field.html" with field=form.value %}
	{% include "partials/form_field.html" with field=form.max_affected_items %}

    {% if form.fields.custom_benefit.choices %}
        <h4>{% trans "...or choose a pre-defined one" %}</h4>
        {% include "partials/form_field.html" with field=form.custom_benefit %}
    {% endif %}
{% endblock %}

{% block submittext %}{% trans "Continue to step 3" %}{% endblock %}

{% block onbodyload %}
    {{ block.super }}
    oscar.dashboard.offers.init();
{% endblock %}
