{% extends 'sb_admin/actions/change_form.html' %} {% load i18n smartshop_tags purchase_tags sb_admin_tags %} {% block form %}
{% if not add %}
{% if user.is_superuser %} {% if original.previous_delivery_state_label != None %} {% trans 'Step back' %} {% endif %} {% endif %}
{% if not graph_context.canceled %} {% url 'admin:cancel-purchase' purchase=original.pk as action_url %} {% if graph_context.delivery_cancel_instance.get_comment_form %} {% trans 'Cancel' %} {% trans 'Purchase' %} {% else %} {% trans 'Cancel' %} {% trans 'Purchase' %} {% endif %} {% endif %} {% block payment_states %} {% for state, value in original.next_payment_states.items %} {% if state != 'CANCEL' %} {% url 'admin:payment-action-with-form' purchase=original.pk action=state as action_url %} {% if value.instance.get_comment_form %} {{ value.label }} {% else %} {{ value.label }} {% endif %} {% endif %} {% endfor %} {% endblock %} {% for state, value in original.next_delivery_states.items %} {% if state != 'CANCEL' %} {% url 'admin:delivery-action-with-form' purchase=original.pk action=state as action_url %} {% if value.instance.get_comment_form %} {{ value.label }} {% else %} {{ value.label }} {% endif %} {% endif %} {% endfor %}
{% endif %}
{{ block.super }} {% endblock %}