{% extends "modeladmin/edit.html" %}
{% load i18n wagtailadmin_tags %}

{% block footer %}
<footer class="footer">
  <ul>
    <li class="actions footer__container">
      <div class="dropdown dropup dropdown-button match-width">
        <button type="submit" class="button action-save button-longrunning" data-clicked-text="{% trans 'Saving…' %}">
          {% icon name="spinner" %}<em>{% trans 'Save' %}</em>
        </button>
      </div>
    </li>

    {# Add refund button if needed. #}
    {% url 'salesman_order_modeladmin_refund' instance.id as order_refund_url %}
    {% if order_refund_url %}    
      <li class="preview footer__container">
        <a href="{{ order_refund_url }}" class="button">{% trans "Refund order" %}</a>
      </li>
    {% endif %}
  </ul>
</footer>
{% endblock %}