{% set userData = app.session.get('userData') %}
<form method="POST" id="form-workSchedule">
    <h5>{{ page_title }}</h5>
    <div id="flash-messages-content-modal"></div>
    <div class="row max-width-initial">
        <div class="large-6 columns">
            <div class="row large-text-center" id="workSchedule-type">
                <div class="large-3 large-text-right columns">
                    {{ form_label(form.type) }}
                </div>
                <div class="large-9 columns">
                    {{ form_widget(form.type) }}
                </div>
            </div>
            <div class="row large-text-center hide" id="workSchedule-facility">
                <div class="large-3 large-text-right columns">
                    {{ form_label(form.health_facility_desc) }}
                </div>
                <div class="large-9 columns">
                    {{ form_widget(form.health_facility_desc) }}
                    {{ form_widget(form.health_facility) }}
                </div>
            </div>
            <div class="row large-text-center hide" id="workSchedule-fromDate">
                <div class="large-3 large-text-right columns">
                    {{ form_label(form.from_date) }}
                </div>
                <div class="large-9 columns">
                    {{ form_widget(form.from_date) }}
                </div>
            </div>
            <div class="row large-text-center hide" id="workSchedule-toDate">
                <div class="large-3 large-text-right columns">
                    {{ form_label(form.to_date) }}
                </div>
                <div class="large-9 columns">
                    {{ form_widget(form.to_date) }}
                </div>
            </div>
            <div class="row large-text-center hide" id="workSchedule-dayName">
                <div class="large-3 large-text-right columns">
                    {{ form_label(form.day_name) }}
                </div>
                <div class="large-9 columns">
                    {{ form_widget(form.day_name) }}
                </div>
            </div>
            <div class="row large-text-center hide" id="workSchedule-note">
                <div class="large-3 large-text-right columns">
                    {{ form_label(form.note) }}
                </div>
                <div class="large-9 columns">
                    {{ form_widget(form.note) }}
                </div>
            </div>
        </div>
        <div class="large-6 columns">
            <div class="large-6 columns hide" id="workSchedule-fromTime">
                <label>From Time</label>
                <div class="row collapse">
                    <div class="large-3 columns">
                        {{ form_widget(form.from_hr) }}
                    </div>
                    <div class="large-1 columns text-center">:</div>
                    <div class="large-3 columns">
                        {{ form_widget(form.from_min) }}
                    </div>
                    <div class="large-1 columns text-center">&nbsp;</div>
                    <div class="large-3 columns end">
                        {{ form_widget(form.from_am) }}
                    </div>
                </div>
            </div>
            <div class="large-6 columns hide" id="workSchedule-toTime">
                <label>To Time</label>
                <div class="row collapse">
                    <div class="large-3 columns">
                        {{ form_widget(form.to_hr) }}
                    </div>
                    <div class="large-1 columns text-center">:</div>
                    <div class="large-3 columns">
                        {{ form_widget(form.to_min) }}
                    </div>
                    <div class="large-1 columns text-center">&nbsp;</div>
                    <div class="large-3 columns end">
                        {{ form_widget(form.to_am) }}
                    </div>
                </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">
                <a href="javascript:void(0)" class="button just-continue href-marketing-staff-work-schedule-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>
                {% if action == 'u' and (userData.type == 'Super Admin' or 'Admin Marketing Staff Work Schedule Delete' in userData.accesses) %}
                    <a href="javascript:void(0)" class="ask-continue button alert href-marketing-staff-work-schedule-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.marketingStaff) }}
    {{ form_widget(form._token) }}
</form>