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

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

</div>
<div class="modal-body">
  <form id="useFm" 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="useType" th:value="${useType}">
          <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="mgtOrgan" name="mgtOrgan" th:disabled="${accessAuth ne 'ACC003'}">
                  <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 userOrgan}"></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="useDt" name="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="detailType" name="detailType">
                  <option value="">선택</option>
                  <th:block th:if="${useType eq 'PVRE'}">
                  <th:block th:each="commonCode:${session.commonCode.get('PVREUSE')}">
		              <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"></option>
		          </th:block>
                  </th:block>
                  <th:block th:if="${useType eq 'QIR'}">
                  <th:block th:each="commonCode:${session.commonCode.get('QIRUSE')}">
		              <option th:value="${commonCode.itemCd}" th:text="${commonCode.itemValue}"></option>
		          </th:block>
                  </th:block>                   
               </select>
               <input type="text" class="form-control" id="detailSelf" name="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="peopleCnt" name="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="description" name="description">
            </div>
          </div>                  
      </form>
</div>
<div class="modal-footer justify-content-between">
  <div class="col-auto">
    <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>
    <button type="button" class="btn btn-primary" id="saveUse">저장</button>

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