{% extends "./base.html" %} {% load i18n %}

{% block "title" %}
<title>{% if title %} {{ title|safe }} {% else %} {% trans "Interactive Withdraw Info Form" %} {% endif %}</title>
{% endblock %}


{% block "content" %}
<section class="section">
  {% block "guidance" %}
  {% if guidance %}
    <center><i>{{ guidance|safe }}</i></center>
  {% else %}
    <center><i>{% trans "Please fill out the fields below." %}</i></center>
  {% endif %}
  {% endblock %}

  {% block "form" %}
  <form method="post" action="{{ post_url }}">
    {% csrf_token %}

    {% for hidden in form.hidden_fields %}
    {{ hidden }}
    {% endfor %}

    {% for field in form.visible_fields %}
    <div class="field">
      <div class="label">
        {{ field.label }}
        {% if field.field.required %}
        <span class="required">*</span>
        {% endif %}
      </div>

      <div class="control">{{ field }}</div>
      {% if field.help_text %}
        <div class="help-text">{{ field.help_text }}</div>
      {% endif %}

      {% if field.errors %}
      <p class="help is-danger">
        {% for error in field.errors %}
        {{ error }}
        {% endfor %}
      </p>
      {% endif %}
    </div>
    {% endfor %}

    {% block "fee_table" %}
    <table class="polaris-fee-table" hidden>
      <tr class="polaris-fee-row"><td class="polaris-fee-label">{% trans "Fee" %}</td><td class="polaris-fee-value">{{ symbol }} 0</td></tr>
      <tr class="polaris-fee-total-row"><td class="polaris-fee-total-label">{% trans "Total" %}</td><td class="polaris-fee-total-value">{{ symbol }} 0</td></tr>
    </table>
    {% endblock %}

    <div class="field at-bottom">
      <div class="control">
        <button class="button submit" type="submit">{% trans "Submit" %}</button>
      </div>
    </div>

  </form>
  {% endblock %}
</section>
{% endblock %}
