{% load i18n %}
{% load currency_filters %}

{% if plan %}
  <h2>{{ plan.plan_name }}</h2>
  <p>{{ plan.plan_description }}</p>
  <ul>
    {% for cost in plan.costs.all %}
      <li>
        <label for="plan-cost-{{ forloop.counter }}">
          <input
            type="radio"
            name="plan-cost"
            id="plan-cost-{{ forloop.counter }}"
            value="{{ cost.id }}"
            {% if forloop.last %}checked="checked"{% endif %}
          >
          {{ cost.cost|currency }}
          {{ cost.display_billing_frequency_text }}
        </label>
      </li>
    {% endfor %}
  </ul>
{% endif %}
