{% extends "base.html" %}
{% load static %}

{% block head_title %}Checkout | {% endblock %}

{% block content %}
<article>
    <header>
        <h1>Checkout</h1>
    </header>
    <section>
        <h3>Shipping Method</h3>
        <form action="{% url 'storefront:checkout-shipping' %}" method="POST">
            {% csrf_token %}
            {{ form.non_field_errors }}
            <fieldset>
                <legend>{{ form.shipping_method.label }}</legend>
                {% for radio in form.shipping_method %}
                <p>
                    <label for="{{ radio.id_for_label }}">
                        {{ radio.choice_label }}
                        {% if 'Flate Rate Box - Medium' in radio.choice_label %}
                            <strong>${{ MD_FLAT_RATE_BOX }}</strong>
                        {% elif 'Regional Rate Box B' in radio.choice_label %}
                            <strong>${{ REGIONAL_RATE_BOX_B }}</strong>
                        {% endif %}
                    </label>
                    {{ radio.tag }}
                </p>
                {% endfor %}
            </fieldset>
            <br>
            <p>
                <input type="submit" value="Continue to Payment">
            </p>
        </form>
    </section>
</article>
{% endblock %}
