{% set userData = app.session.get('userData') %}
<form method="POST" id="ave_cost_form" action="{{ path('item_ave_cost_form', {item_id: item_id, action: action, id: id}) }}">
    <div class="row max-width-initial">
        <div class="large-12 columns">
            <h5>Basic information</h5>
            <p class="form-hint-text">Enter basic information below</p>
            <div class="row">
                <div class="large-4 large-text-right columns">
                    {{ form_label(form.health_facility_description) }}
                </div>
                <div class="large-8 columns">
                    {{ form_widget(form.health_facility) }}
                    {{ form_widget(form.health_facility_description) }}
                </div>
            </div>
            <div class="row">
                <div class="large-4 large-text-right columns">
                    {{ form_label(form.ave_cost) }}
                </div>
                <div class="large-8 columns">
                    {{ form_widget(form.ave_cost) }}
                </div>
            </div>
        </div>
        <div class="large-6 columns">
        </div>
        <div class="small-12 columns">
            <hr class="max-width-initial">
            <div class="button-container">
                <button type="submit" class="button just-continue" 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 Items Ave Cost Delete' in userData.accesses) %}
                    <button type="submit" class="ask-continue button alert" name="action" value="d"
                            data-message="Are you sure you want to delete this record?"
                    >Delete</button>
                {% endif %}
                {#<button type="button" data-close class="button secondary">Back</button>#}
            </div>
        </div>
    </div>
    {{ form_widget(form.item, {value: item_id}) }}
    {{ form_widget(form.action) }}
    {{ form_widget(form.id) }}
    {{ form_widget(form._token) }}
</form>