{% extends "checkout/onestep.html" %}
{% load i18n %}

{% block voucher_modal %}
{% if show_voucher_block and voucher_form %}
  <div class="modal fade" id="voucherModal" tabindex="-1" role="dialog" aria-labelledby="voucherModalLabel">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
          <h4 class="modal-title" id="voucherModalLabel">Modal title</h4>
        </div>
        <div class="modal-body">
          <form id="voucher_form" action="{% url 'basket:vouchers-add' %}" method="post">
              {% csrf_token %}
              {% include "oscar/partials/form_fields.html" with form=voucher_form %}
              <button type="submit" class="btn btn-primary" data-loading-text="{% trans 'Adding...' %}">{% trans "Add voucher" %}</button>
          </form>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-secondary" data-dismiss="modal">{% trans "Close" %}</button>
        </div>
      </div>
    </div>
  </div>
{% endif %}
{% endblock %}