{% extends "base.html" %}

{% block "title" %}
<title>Interactive Withdraw Info Form</title>
{% endblock %}


{% block "content" %}
<section class="section">
    <p>
        This is the interactive Withdraw flow. Please enter the amount you would like to withdraw and the bank account
        number, and choose a bank for withdrawal.
    </p>
    <br />
    <form method="post" action="">
        {% csrf_token %}

        {% for field in form %}
        <div class="field">
            {% if field.name == 'amount' %}
            <label class="label">{{ field.label }}</label>
            <div class="control has-icons-left">
                {{ field }}
                <span class="icon is-small is-left">
                    <i class="fas fa-dollar-sign"></i>
                </span>
            </div>

            {% else %}
            <label class="label"> {{ field.label }}</label>
            <div> {{ field }} </div>
            {% endif %}

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

        </div>
        {% endfor %}

        <div class="field">
            <div class="control">
                <button class="button is-link" type="submit">Continue</button>
            </div>
        </div>
    </form>
</section>
{% endblock %}