<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="modal-header">
  <h5 class="modal-title">외사경찰 교육 등록</h5>
  <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
  <div class="mb-3 mt-3 row">
    <label for="dicCode" class="col-sm-2 col-form-label col-form-label-sm text-center">직급</label>
    <div class="col-sm-4">
      <input type="text" class="form-control form-control-sm" th:value="${userInfo.titleCd}" readonly>
    </div>
    <label for="userId" class="col-sm-2 col-form-label col-form-label-sm text-center ">생년월일</label>
    <div class="col-sm-4">
      <input type="text" class="form-control form-control-sm" th:value="${userInfo.birthDate}" readonly>
    </div>
  </div>
  <div class="mb-3 row">
    <label for="phoneNo" class="col-sm-2 col-form-label col-form-label-sm text-center">성명</label>
    <div class="col-sm-4">
      <input type="tel" class="form-control form-control-sm" th:value="|${userInfo.ogCd} ${userInfo.ofcCd} ${userInfo.userNm}|" readonly>
    </div>
    <label for="email" class="col-sm-2 col-form-label col-form-label-sm text-center">성별</label>
    <div class="col-sm-4">
      <input type="email" class="form-control form-control-sm" th:value="${userInfo.sex}" readonly>
    </div>
  </div>
  <div class="mb-3 row">
    <label for="sex" class="col-sm-2 col-form-label col-form-label-sm text-center">학력사항</label>
    <div class="col-sm-2">
      <input type="email" class="form-control form-control-sm"  readonly>
    </div>
    <label for="sex" class="col-sm-1 col-form-label col-form-label-sm text-center">학교</label>
    <div class="col-sm-2">
      <input type="email" class="form-control form-control-sm"  readonly>
    </div>
    <label for="sex" class="col-sm-2 col-form-label col-form-label-sm text-center">외국어</label>
    <div class="col-sm-2">
      <input type="email" class="form-control form-control-sm" th:value="${userInfo.languageCd}" readonly>
    </div>
  </div>
  <div class="mb-3 row">
    <label for="birthDate" class="col-sm-2 col-form-label col-form-label-sm text-center">전공</label>
    <div class="col-sm-4">
      <input type="text" class="form-control form-control-sm dateSelector" id="birthDate" name="birthDate" readonly>
    </div>
  </div>
  <div class="card">
    <div class="card-body text-center">
      <div class="row">
        <table class="table table-striped" id="categoryTable">
          <thead>
          <tr>
            <th>교육명</th>
            <th>교육일</th>
            <th>담당기관</th>
            <th></th>
          </tr>
          </thead>
          <tbody class="overflow-scroll">
          <tr th:each="list:${eduList}">
            <td th:text="${list.eduName}"></td>
            <td th:text="|${list.eduSdate}~${list.eduEdate}|"></td>
            <td th:text="${list.eduRa}"></td>
            <td>
              <button type="button" class="btn btn-sm btn-danger" id="deleteBtn" th:data-eduseq="${list.eduSeq}" th:data-userseq="${list.userSeq}" th:if="${accessAuth eq 'ACC003'} or ${list.wrtUserSeq eq userSeq}">삭제</button>
            </td>
          </tr>
          </tbody>
        </table>

        <div id="insertEdu">
          <div class="row justify-content-center">
            <button class="btn btn-sm btn-outline-primary col-auto" th:data-userseq="${userInfo.userSeq}" id="eduAddBtn"><i class="bi bi-plus-lg"></i></button>
          </div>
        </div>

      </div>
    </div>
  </div>
</div>
<div class="modal-footer row justify-content-between">
  <div class="col-auto">
    <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
  </div>
  <div class="col-auto">
    <button type="button" class="btn btn-primary" id="saveBtn" th:if="${accessAuth eq 'ACC003'} or ${userInfo.userSeq eq userSeq}">저장</button>
  </div>
</div>
</html>