{% extends 'oscar/dashboard/vouchers/voucher_form.html' %} {% load currency_filters %} {% load i18n %} {% block dashboard_content %}
{% csrf_token %}

{% if voucher %} {% trans "Edit voucher" %} {% else %} {% trans "Create voucher" %} {% endif %}

{% include "oscar/dashboard/partials/form_field.html" with field=form.name %} {% include "oscar/dashboard/partials/form_field.html" with field=form.description %} {% include "oscar/dashboard/partials/form_field.html" with field=form.code %} {% include "oscar/dashboard/partials/form_field.html" with field=form.priority %} {% include "oscar/dashboard/partials/form_field.html" with field=form.start_datetime %} {% include "oscar/dashboard/partials/form_field.html" with field=form.end_datetime %}

{% trans "Coupon Display" %}

{% include "oscar/dashboard/partials/form_field.html" with field=form.desktop_image %} {% include "oscar/dashboard/partials/form_field.html" with field=form.mobile_image %}

{% trans "Condition" %}

{% include "oscar/dashboard/partials/form_field.html" with field=form.condition %}

{% url 'dashboard:condition-list' as condition_list_url %} {% blocktrans %} Conditions can be created and edited from within the condition dashboard. {% endblocktrans %}

{% trans "Reward" %}

{% include "oscar/dashboard/partials/form_field.html" with field=form.benefit %}

{% url 'dashboard:benefit-list' as benefit_list_url %} {% blocktrans %} Incentives can be created and edited from within the benefit dashboard. {% endblocktrans %}

{% trans "Offer Group" %}

{% include "oscar/dashboard/partials/form_field.html" with field=form.offer_group %}

{% url 'dashboard:offergroup-list' as offergroup_list_url %} {% blocktrans %} Offer groups can be created and edited from within the offer group dashboard. {% endblocktrans %}

{% trans "Child Codes" %}

{% if voucher %} {% if voucher.children.count %}

{% blocktrans with voucher.children.count as count %}All changes will apply to this voucher and its {{ count }} child codes.{% endblocktrans %}

{% else %}

{% blocktrans %}This voucher has no children.{% endblocktrans %}

{% endif %} {% else %} {% include "oscar/dashboard/partials/form_field.html" with field=form.create_children %} {% include "oscar/dashboard/partials/form_field.html" with field=form.child_creation_type %} {% include "oscar/dashboard/partials/form_field.html" with field=form.auto_generate_child_count %} {% include "oscar/dashboard/partials/form_field.html" with field=form.custom_child_codes %} {% endif %}

{% trans "Usage Constraints" %}

{% include "oscar/dashboard/partials/form_field.html" with field=form.usage %} {% include "oscar/dashboard/partials/form_field.html" with field=form.limit_usage_by_group %} {% include "oscar/dashboard/partials/form_field.html" with field=form.groups %} {% include "oscar/dashboard/partials/form_field.html" with field=form.max_global_applications %} {% include "oscar/dashboard/partials/form_field.html" with field=form.max_user_applications %} {% include "oscar/dashboard/partials/form_field.html" with field=form.max_basket_applications %} {% include "oscar/dashboard/partials/form_field.html" with field=form.max_discount %}
{% block form_actions %}
{% trans "or" %}
{% trans "Cancel" %}
{% endblock form_actions %}
{% endblock dashboard_content %} {% block extrascripts %} {{ block.super }} {% endblock %}