{% set userData = app.session.get('userData') %}
<form method="POST" id="form-referringHealthFacilityNote">
    <h5>{{ page_title }}</h5>
    <div id="flash-messages-content-modal"></div>
    <div class="row max-width-initial">
        <div class="large-12 columns">
            <div class="row large-text-center">
                <div class="large-12 columns">
                    {{ form_widget(form.type) }}
                </div>
                <div class="large-12 columns">
                    {{ form_widget(form.note) }}
                </div>
            </div>
        </div>
    </div>
    <hr>
    <div class="row-max-width-initial">
        <div class="small-12 columns no-padding-right">
            <div class="button-container clearfix text-right">
                {% if action == 'n' and (userData.type == 'Super Admin' or 'Admin Referring Health Facility Note New' in userData.accesses) %}
                    <a href="javascript:void(0)" class="button just-continue href-referring-health-facility-note-action float-right" data-axn="{{ action }}"
                       data-message="Are you sure you want to save this information?"
                       style="margin-left: 10px; margin-right: 0;"
                    >Save</a>
                {% endif %}
                {% if action == 'u' and (userData.type == 'Super Admin' or 'Admin Referring Health Facility Note Delete' in userData.accesses) %}
                    <a href="javascript:void(0)" class="ask-continue button alert href-referring-health-facility-note-action float-right" data-axn="d"
                       data-message="Are you sure you want to delete this record?"
                       style="margin-left: 10px; margin-right: 0;"
                    >Delete</a>
                {% endif %}
                <a href="javascript:void(0)" class="button secondary" data-close style="margin-left: 10px; margin-right: 0;">Close</a>
            </div>
        </div>
    </div>
    {{ form_widget(form.action) }}
    {{ form_widget(form.id) }}
    {{ form_widget(form.referringHealthFacility) }}
    {{ form_widget(form._token) }}
</form>
<script language="javascript">
    //<![CDATA[
    //]]>
</script>