
<div class="tab-pane fade" id="pills-policies" role="tabpanel" aria-labelledby="pills-policies-tab">
    <div class="row mx-0 row-gap-30">
      <div class="col-12 px-0">
        <div class="card tabcard">
            <div class="card-body">
                <h3 class="setting_title flex-column align-items-start"><span>Cancellation Policy <span class="editsetting"><img src="/images/edit.svg" alt=""></span></span><span class="subtitle">Define what happens when a student cancels through the Student Portal. As the tutor, you can overwrite the student's attendance at your discretion.</span></h3>
                <form class="policies" id="cancellation">
                  <div class="settings">
                    <div class="row mx-0 row-gap-20">
                        <div class="col-12 px-0">
                          <h6 class="setting_name policy m-0">Event Cancellation in Student Portal</h6>
                          <ul class="settinglist flex-column align-items-start">
                              <li>
                                <div class="form-group form-check">
                                    <input type="checkbox" name="allow_event_cancellation" class="form-check-input cancellation-input-group" id="allow_event_cancellation" <% if (businessSetting?.cancellation_policy[0].allow_event_cancellation == true) { %> checked <% } %> disabled>
                                    <label class="form-check-label" for="allow_event_cancellation">Allow event cancellation on the platform</label>
                                </div>
                              </li>
                          </ul>
                        </div>
                        <div class="col-12 px-0">
                          <h6 class="setting_name policy">Allow prior cancellation up to</h6>
                          <div class="prior-input">
                            <input type="number" name="prior_cancellation_time" class="cancellation-input-group" value="<%=businessSetting?.cancellation_policy[0].prior_cancellation_time%>" min="0"  mix="72" disabled>
                            <label class="prior-label">Hours</label>
                          </div>
                          <ul class="settinglist flex-column align-items-start">
                              <li>
                                <div class="form-group form-check">
                                    <input type="checkbox"  name="notify_on_cancellation" class="form-check-input cancellation-input-group" id="notify_on_cancellation" <% if (businessSetting?.cancellation_policy[0].notify_on_cancellation == true) { %> checked <% } %>  disabled />
                                    <label class="form-check-label" for="notify_on_cancellation">Log in-app notification when a cancellation occurs</label>
                                </div>
                              </li>
                          </ul>
                        </div>
                        <div class="col-12 px-0">
                          <h6 class="setting_name policy">If an event is cancelled before a deadline 
                            <!-- <span class="subtitle">Mark as "Absent, Notice Given"</span> -->
                          </h6>
                          <div class="prior-input">
                            <select name="event_cancelled_before_deadline" class="cancellation-input-group" disabled>
                              <option value="rm_std_from_attendee_list" <% if (businessSetting?.cancellation_policy[0].event_cancelled_before_deadline == 'rm_std_from_attendee_list') { %> selected <% } %>>Remove student from attendee list</option>
                              <option value="mark_absent_notice_given" <% if (businessSetting?.cancellation_policy[0].event_cancelled_before_deadline == 'mark_absent_notice_given') { %> selected <% } %>>Mark as "Absent, Notice Given"</option>
                            </select>
                          </div>
                        </div>
                        <div class="col-12 px-0">
                          <h6 class="setting_name policy">If an event is cancelled after a deadline 
                            <!-- <span class="subtitle">Mark as "Absent, Bill & Give Make-Up Credit ($)"</span> -->
                          </h6>
                          <div class="prior-input">
                            <select name="event_cancelled_after_deadline" class="cancellation-input-group" disabled>
                              <option value="rm_std_from_attendee_list" <% if (businessSetting?.cancellation_policy[0].event_cancelled_after_deadline == 'rm_std_from_attendee_list') { %> selected <% } %>>Remove student from attendee list</option>
                              <option value="mark_absent_notice_given" <% if (businessSetting?.cancellation_policy[0].event_cancelled_after_deadline == 'mark_absent_notice_given') { %> selected <% } %>>Mark as "Absent, Notice Given"</option>
                            </select>
                          </div>
                        </div>
                        <div class="col-12 px-0">
                          <h6 class="setting_name policy m-0"><span>Policy Text <small>(Optional)</small></span> </h6>
                          <span class="subtitle size-12">No cancellation policy text has been added.</span>
                          <div class="prior-input mw-100 mt-2">
                            <textarea name="policy_text" class="cancellation-input-group" disabled><%=businessSetting?.cancellation_policy[0].policy_text%></textarea>
                          </div>
                        </div>
                        <div class="col-12 px-0 text-right btngroup">
                        <button type="button" class="btn form-button cancel-btn theme-btn">Cancel</button>
                        <button type="button" class="btn form-button save-btn theme-btn">Save</button>
                        </div>
                    </div>
                  </div>
                </form>
            </div>
        </div>
      </div>
    </div>
</div>