{% set userData = app.session.get('userData') %}
<form id="form-canvassItemSupplier" method="POST">
    <h4>{{ page_title }}</h4>
    <div id="flash-messages-content-modal"></div>
    <div>{{ canvassItem.materialrequisitionItem.item.description }}</div>
    <p class="form-hint-text">Enter basic information below</p>
    {% if userData.type == 'Super Admin' or 'Admin Supplier New' in userData.accesses %}
        <div class="row">
            <div class="small-12 columns text-right">
                <a target="_blank" href="{{ path('supplier_form') }}" >New Supplier</a>
            </div>
        </div>
    {% endif %}
    <div class="row">
        <div class="large-4 large-text-right columns">
            {{ form_label(form.supplier_description) }}
        </div>
        <div class="large-8 columns">
            {{ form_widget(form.supplier_description) }}
            {{ form_widget(form.supplier_id) }}
        </div>
    </div>
    <div class="row">
        <div class="large-4 large-text-right columns">
            {{ form_label(form.price) }}
        </div>
        <div class="large-8 columns">
            {{ form_widget(form.price) }}
        </div>
    </div>
    <div class="row">
        <div class="large-4 large-text-right columns">
            {{ form_label(form.note) }}
        </div>
        <div class="large-8 columns">
            {{ form_widget(form.note) }}
        </div>
    </div>
    <hr>
    <div class="row max-width-initial">
        <div class="small-12 columns no-padding-right">
            <div class="button-container clearfix">
                <button type="button" class="button just-continue href-canvassItemSupplier-action float-right" name="action" value="{{ action }}"
                        data-message="Are you sure you want to save this information?"
                >Save</button>
                {#{% if action == 'u' and (userData.type == 'Super Admin' or 'Admin Material Requisition Item Update Delete' in userData.accesses) %}
                    <button type="button" class="ask-continue button alert href-materialRequisitionItem-action float-right" name="action" value="d"
                            data-message="Are you sure you want to delete this record?"
                    >Delete</button>
                {% endif %}#}
            </div>
        </div>
    </div>
    {{ form_widget(form.canvassItem_id) }}
    {{ form_widget(form.action) }}
    {{ form_widget(form.id) }}
    {{ form_widget(form._token) }}
</form>