<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">

<div class="modal-header">
  <th:block th:if="${info.useType eq 'PVRE'}">
  <h5 class="modal-title" id="menuEditModalLabel">휴대용 녹화장비 사용대장 수정</h5>
  </th:block>
  <th:block th:if="${info.useType eq 'QIR'}">
  <h5 class="modal-title" id="menuEditModalLabel">방역조사실 사용대장 수정</h5>
  </th:block>
  	<button type="button" class="btn-close" id="closeModal" data-bs-dismiss="modal" aria-label="Close"></button>

</div>
<div class="modal-body">
  <form id="useUpdateFm" 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" name="useNo" th:value="${info.useNo}">
    	<input type="hidden" name="useType" th:value="${info.useType}">
    	<input type="hidden" name="versionNo" th:value="${info.versionNo}">
          <div class="mb-3 row">
            <label for="ogCd" class="col-sm-2 col-form-label text-center">사용관서</label>        
            <div class="col-sm-3">
            	<select class="form-select form-select-sm" id="mMgtOrgan" name="mgtOrgan" disabled>
                  <option value="">선택</option>
                  <th:block th:each="organList:${organList}">
		              <option th:value="${organList.item_cd}" th:text="${organList.item_value}" th:selected="${organList.item_cd eq info.mgtOrgan}"></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-4">
                  <input type="text" class="form-control" id="mUseDt" name="useDt" th:value="${info.useDt}" readonly>
            </div>
          </div> 
          <div class="mb-3 row">
            <label for="ogCd" class="col-sm-2 col-form-label text-center">사용사유</label>        
            <div class="col-sm-3">
               <select class="form-select form-select-sm" id="mDetailType" name="detailType">
                  <option value="">선택</option>
                  <th:block th:if="${info.useType eq 'PVRE'}">
                  <th:block th:each="commonCode:${session.commonCode.get('PVREUSE')}">
		              <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq info.detailType}"></option>
		          </th:block>
		          </th:block>
		          <th:block th:if="${info.useType eq 'QIR'}">
                  <th:block th:each="commonCode:${session.commonCode.get('QIRUSE')}">
		              <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}" th:selected="${commonCode.itemCd eq info.detailType}"></option>
		          </th:block>
		          </th:block>
               </select>
               <input type="text" class="form-control" id="mDetailSelf" name="detailSelf" th:value="${info.detailSelf}">
            </div>
          </div>
          <div class="mb-3 row">
            <label for="ogCd" class="col-sm-2 col-form-label text-center">사용인원</label>
            <div class="col-sm-4">
                  <input type="number" class="form-control" id="mPeopleCnt" name="peopleCnt" th:value="${info.peopleCnt}">
            </div>
          </div> 
          <div class="mb-3 row">
            <label for="ogCd" class="col-sm-2 col-form-label text-center">비고</label>
            <div class="col-sm-4">
                  <input type="text" class="form-control" id="mDescription" name="description" th:value="${info.description}">
            </div>
          </div>                  
      </form>
</div>
<div class="modal-footer justify-content-between">
  <div class="col-auto">
    <button type="button" class="btn btn-secondary" id="closeModal" data-bs-dismiss="modal">닫기</button>
    <button type="button" class="btn btn-primary" id="updateUse">수정</button>

  </div>
</div>
</html>