<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<div class="modal-dialog modal-lg">
      <div class="modal-content ">
       <form id="trInfoUpdate" method="post">
        <input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
   		<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
   		<input type="hidden" class="translatorKey" name="translatorKey" th:value="${trInfo.translatorKey}"/>
   		<input type="hidden" class="versionNo" name="versionNo" th:value="${trInfo.versionNo}"/>
          <div class="mb-3 row">
          <div class="mb-3 row">
            <label for="ogCd" class="col-sm-2 col-form-label text-center">관서</label>        
            <div class="col-sm-2">
               <select class="form-select form-select-sm" id="eOgdp1" name="ogdp1" th:disabled="${accessAuth ne 'ACC003'}">
                  <option value="">선택</option>
                  <th:block th:each="commonCode:${session.commonCode.get('OG')}">
                    <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd} == ${trInfo.ogdp1}"></option>
                  </th:block>
               </select>
            </div>
            <label for="ofcCd" class="col-sm-1 col-form-label text-center">언어</label>
            <div class="col-sm-2">
              <select class="form-select form-select-sm" id="trLang" name="trLang">
                  <option value="">선택</option>
                  <th:block th:each="commonCode:${session.commonCode.get('LGG')}">
                    <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd} == ${trInfo.trLang}"></option>
                  </th:block>
               </select>
            </div>
           <label for="ofcCd" class="col-sm-1 col-form-label text-center">경력</label>
            <div class="col-sm-4">
              <input type="text" class="form-control" id="trCareer" name="trCareer" th:value="${trInfo.trCareer}">
            </div> 
          </div>
          <div class="mb-3 row">
            <label for="ogCd" class="col-sm-2 col-form-label text-center">성명</label>
            <div class="col-sm-2">
              <input type="text" class="form-control" id="trEname" name="trName" th:value="${trInfo.trName}">
            </div>
            <label for="ofcCd" class="col-sm-1 col-form-label text-center">성별</label>
            <div class="col-sm-2">
              <select class="form-select form-select-sm" name="trSex">
                  <option value="">선택</option>
                  <th:block th:each="commonCode:${session.commonCode.get('SEX')}">
                    <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd} == ${trInfo.trSex}"></option>
                  </th:block>
               </select>
            </div>
           <label for="ofcCd" class="col-sm-1 col-form-label text-center">연락처</label>
            <div class="col-sm-4">
              <input type="text" class="form-control" id="trPhone" name="trPhone" th:value="${trInfo.trPhone}">
            </div> 
          </div>
          <div class="mb-3 row">
            <label for="ogCd" class="col-sm-2 col-form-label text-center">국적</label>
            <div class="col-sm-2">
               <select class="form-select form-select-sm" name="trNny">
                  <option value="">선택</option>
                  <th:block th:each="commonCode:${session.commonCode.get('NNY')}">
                    <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd} == ${trInfo.trNny}"></option>
                  </th:block>
               </select>
            </div>
            <label for="ofcCd" class="col-sm-1 col-form-label text-center">나이</label>
            <div class="col-sm-2">
              <input type="text" class="form-control" id="trAge" name="trAge" th:value="${trInfo.trAge}">
            </div>
           <label for="ofcCd" class="col-sm-1 col-form-label text-center">학력</label>
            <div class="col-sm-4">
              <select class="form-select form-select-sm" name="trEdu">
                  <option value="">선택</option>
                  <th:block th:each="commonCode:${session.commonCode.get('EDU')}">
                    <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd} == ${trInfo.trEdu}"></option>
                  </th:block>
               </select>
            </div> 
          </div>
          <div class="mb-3 row">
            <label for="ogCd" class="col-sm-2 col-form-label text-center">자격증</label>
            <div class="col-sm-2">
              <input type="text" class="form-control" id="trCft" name="trCft" th:value="${trInfo.trCft}">
            </div>
            <label for="ofcCd" class="col-sm-1 col-form-label text-center">비자</label>
            <div class="col-sm-2">
              <select class="form-select form-select-sm" name="trVisa">
                  <option value="">선택</option>
                  <th:block th:each="commonCode:${session.commonCode.get('VISA')}">
                    <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd} == ${trInfo.trVisa}"></option>
                  </th:block>
               </select>
            </div>
           <label for="ofcCd" class="col-sm-1 col-form-label text-center">위촉일</label>
            <div class="col-sm-4">
               <input type="text" class="form-control" id="viewAptDt" name="aptDt" th:value="${trInfo.aptDt}">
            </div> 
          </div>
          <label for="ogCd" class="col-sm-2 col-form-label text-center">해촉</label>
            <div class="col-sm-2">
               <select class="form-select form-select-sm" name="dmlYn">
               	  <option value="">선택</option>
                  <option value="O" th:selected="'O' == ${trInfo.dmlYn}">예</option>
                  <option value="X" th:selected="'X' == ${trInfo.dmlYn}">아니오</option>
               </select>
            </div>

            <div class="mb-3 row">
              <label for="tel" class="col-sm-2 col-form-label text-center">비고</label>
              <div class="col-sm-4">
                <textarea  class="form-control" id="remark" name="remark" th:text="${trInfo.remark}"></textarea>
              </div>
              
            </div>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-secondary" id="trDeleteBtn" th:unless="${accessAuth eq 'ACC001'}">해임</button>
            <button type="button" class="btn btn-primary" id="updateBtn" th:if="${accessAuth eq 'ACC003'} or ${wrtId eq userId}">수정</button>
          </div>
         </form>
        </div>
      </div>
</html>