{% extends "checkout/partials/formblock.html" %}
{% load i18n ocyan %}

{% block panel_header %}
  <label class="control-label required{% if form.errors %} error{% endif %}">
    <h3>{% trans 'Shipping method' %}</h3>
  </label>
{% endblock %}

{% block panel_body %}
  {% if form.hidden_fields %}
    {{ form }}
  {% else %}
    <ul id="shipping-method-list" class="shipping-methods">
    {% for widget, method in form.method_code.subwidgets|zip:form.method_code.field.methods %}
      <li>
        <div class="shipping-label">
          <span>
            {{ widget }}
          </span>
        {% if method.description %}
          <span class="help-text">
            {{method.description}}
          </span>
        {% endif %}
        </div>
        <span class="shipping-price">
          {% method_price method as session %}
          {% include 'oscar/catalogue/partials/price.html' %}
        </span>
      </li>
    {% endfor %}
    {% if form.method_code.errors %}
      <li><span class="error-block"><i class="icon-exclamation-sign"></i> {{ form.method_code.errors|join:" " }}</span></li>
    {% endif %}
    </ul>
  {% endif %}
{% endblock %}
