{% load bloomerp %}
{% load crispy_forms_tags %}

<h5 class="card-title">Update {{object}}</h5>


<!-- Progress bar -->
<div class="progress mb-4" style="height: 25px;">
    <div class="progress-bar progress-bar-striped" role="progressbar" 
        style="width: {{wizard.steps.step1|percentage:wizard.steps.count|floatformat:0}}%" 
        aria-valuenow="{{wizard.steps.step1|percentage:wizard.steps.count|floatformat:0}}" 
        aria-valuemin="0" 
        aria-valuemax="100">
        {{wizard.steps.step1|percentage:wizard.steps.count|floatformat:0}}%</div>
</div>
<!-- End Progress bar -->

<form action="" method="post" enctype="multipart/form-data">
    {% csrf_token %}
    <table>
        {{ wizard.management_form }}
        {% if wizard.form.forms %}
            {{ wizard.form.management_form }}
            {% for form in wizard.form.forms %}
                {{ form | crispy }}
            {% endfor %}
        {% else %}
            {{ wizard.form | crispy }}
        {% endif %}
    </table>

    <div class="btn-group" role="group">
        {% if wizard.steps.prev %}
            <button class="btn btn-primary" name="wizard_goto_step" type="submit" value="{{ wizard.steps.prev }}">
                Previous
            </button>
        {% endif %}
        <button type="submit" class="btn btn-primary"> Next</button>
    </div>
</form>
