<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
  <div class="tab-pane fade show active" id="accessTabPanel" role="tabpanel" aria-labelledby="accessTab" tabindex="0">
    <form id="userInfoUpdate" action="#" th:action="@{/admin/insertUserInfo}" method="post">
          <label style="font-size: 12px">     
          <input type="radio" name="userRole" value="ROLE_ADMIN,ROLE_USER" th:checked="${userInfo.userRole eq 'ROLE_ADMIN,ROLE_USER'}">
          관리자</label>
          <label style="font-size: 12px">     
          <input type="radio" name="userRole" value="ROLE_USER" th:checked="${userInfo.userRole eq 'ROLE_USER'}">
          일반사용자</label>
          <div class="mb-3 row">
          <input type="hidden" name="userSeq" id="userSeq" class="userSeq" th:value="${userInfo.userSeq}">               
          <div class="mb-3 mt-3 row">
            <label for="userId" class="col-sm-2 col-form-label text-center ">아이디</label>
            <div class="col-sm-4">
              <input type="text" class="form-control" id="userId" name="userId" th:value="${userInfo.userId}" autocomplete="off" readonly>
              <label for="userId" style="font-size: 12px">6~20자 사이의 알파벳, 숫자를 입력하세요</label>
            </div>
            <label for="userNm" class="col-sm-2 col-form-label text-center">이름</label>
            <div class="col-sm-4">
              <input type="text" class=" form-control" id="userNm" name="userNm" th:value="${userInfo.userNm}" autocomplete="off">
            </div>
          </div>
          <div class="mb-3 row">
            <label for="modalPassword" class="col-sm-2 col-form-label text-center">비밀번호 변경</label>
            <div class="col-sm-4">
              <input type="password" class="form-control" id="modalPassword" name="password" >
              <label for="userId" style="font-size: 12px">8~16자 사이의 알파벳, 숫자, 특수문자 조합</label>
            </div>
            <label for="passwordConfirm" class="col-sm-2 col-form-label text-center">비밀번호 확인</label>
            <div class="col-sm-4">
              <input type="password" class="form-control" id="passwordConfirm">
            </div>
          </div>
          <div class="mb-3 row">
            <label for="tel" class="col-sm-2 col-form-label text-center">전화번호</label>
            <div class="col-sm-4">
              <input type="tel" class="form-control" id="tel">
            </div>
            <label for="email" class="col-sm-2 col-form-label text-center">이메일</label>
            <div class="col-sm-4">
              <input type="email" class="form-control" id="email">
            </div>
          </div>
          <div class="mb-3 row">
            <label for="telP" class="col-sm-2 col-form-label text-center">휴대전화</label>
            <div class="col-sm-4">
              <input type="tel" class="form-control" id="telP">
            </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">
              <select class="form-control" id="ogCd" name="ogCd">
              	<option value="">--선택--</option>
              	<option th:each="val : ${OgList}" th:value="${val?.itemCd}" th:utext="${val?.itemValue}" th:selected="${val?.itemCd} == ${userInfo.ogCd}">
              	</option>
              </select> 
            </div>
            <label for="ofcCd" class="col-sm-2 col-form-label text-center">부서</label>
            <div class="col-sm-4">
              <select class="form-control" id="ofcCd" name="ofcCd">
              	<option value="">--선택--</option>
              	<option th:each="val : ${OfcList}" th:value="${val?.itemCd}" th:utext="${val?.itemValue}" th:selected="${val?.itemCd} == ${userInfo.ofcCd}">
              	</option>
              </select>
            </div>
          </div>
          <div class="mb-3 row" >
            <label for="address" class="col-sm-2 col-form-label text-center">주소</label>
            <div class="col-sm-8">
              <input type="adress" class="form-control" id="address">
            </div>
            <div class="col-sm-2">
              <button type="button" class="btn btn-secondary" id="search">주소검색</button>
            </div>
          </div>
          <div class="mb-3 row">
              <label for="addresses" class="col-sm-2 col-form-label text-center">상세주소</label>
              <div class="col-sm-10">
                <input type="address" class="form-control" id="addresses">
              </div>
            </div>
            <div class="mb-3 row">
              <label for="photo" class="col-sm-2 col-form-label text-center">사진</label>
              <div class="col-sm-4">
                <input type="file" style="font-size: 12px" class="form-control" id="photo">
              </div>
              <label for="sign" class="col-sm-2 col-form-label text-center">서명</label>
              <div class="col-sm-4">
                <input type="file" style="font-size: 12px" class="form-control" id="sign">
              </div>
            </div>
            <div class="mb-3 row">
              <label for="tel" class="col-sm-2 col-form-label text-center">요청사항</label>
              <div class="col-sm-4">
                <input type="text" class="form-control" id="need">
              </div>
              <label for="precautions" class="col-sm-2 col-form-label text-center">주의사항</label>
              <div class="col-sm-4">
                <input type="text" class="form-control" id="precautions">
              </div>
            </div>
          </div>
         </form>
  </div>
</html>