<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<jsp:include page="${data._INCLUDE}/header.jsp"></jsp:include>
</head>
<body>
    <div class="wrapper">
        <jsp:include page="${data._INCLUDE}/sidebar.jsp"></jsp:include>
        
        <div class="main">
            <jsp:include page="${data._INCLUDE}/top.jsp"></jsp:include>

            <main class="content">
                <div class="container-fluid p-0">
                    <!-- 환자관리 : 신규환자 등록 START -->
                    <div class="row">
                        <div class="col-12 col-lg-6">
                            <h1 class="h3 mb-3">
                            정보변경
                            </h1>
                        </div>
                        <div class="col-12 col-lg-6  text-right">
                            <nav aria-label="breadcrumb">
                                <ol class="breadcrumb">
                                    <li class="breadcrumb-item"><a href="javscript:;">Home</a></li>
                                    <li class="breadcrumb-item">의료진 관리</li>
                                    <li class="breadcrumb-item active">의료진 정보 수정</li>
                                </ol>
                            </nav>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-12">
                            <div class="card">
                                <div class="card-header">
                                    <h1 class="h4">- 사용자 정보 수정</h1>
                                </div>
                                <div class="card-body">
                                    <table class="table mobile-table">
                                        <colgroup>
                                            <col style="width:15%">
                                            <col style="width:35%">
                                            <col style="width:15%">
                                            <col style="width:35%">
                                        </colgroup>
                                        <tr>
                                            <th>아이디</th>
                                            <td>
                                                <c:out value="${info.id}" />
                                            </td>
                                            <th>이름</th>
                                            <td>
                                                <c:out value="${info.name}" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>현재 비밀번호</th>
                                            <td colspan="3">
                                                <input type="text" class="form-control" name="password" required>
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>신규 비밀번호</th>
                                            <td colspan="3">
                                                <input type="text" class="form-control" name="passwordNew">
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>비밀번호 확인</th>
                                            <td colspan="3">
                                                <input type="text" class="form-control" name="passwordConfirm">
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>휴대폰번호</th>
                                            <td>
                                                <input type="text" class="form-control" name="phoneNumber" value="${info.phoneNumber}" placeholder="01012341234">
                                            </td>
                                            <th>치료센터</th>
                                            <td>
                                                <select class="custom-select" name="centerCode">
                                                    <c:forEach var="i" items="${centerList}">
                                                        <option value="${i.centerCode}" <c:if test="${i.centerCode eq centerCode}"> selected="selected"</c:if>><c:out value="${i.centerName}" /></option>
                                                    </c:forEach>
                                                    
                                                    <!-- <option selected="">센터-2</option> -->
                                                </select>
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>권한</th>
                                            <td>
                                                <select class="custom-select" name="groupIdx">
                                                    <option selected="">센터-1</option>
                                                    <option selected="">센터-2</option>
                                                </select>
                                            </td>
                                            <th>상태</th>
                                            <td>
                                                <label class="form-check form-check-inline">
                                                    <input class="form-check-input" type="radio" name="useYn" value="Y" <c:if test="${info.useYn eq 'Y'}">checked="checked"</c:if>>
                                                    <span class="form-check-label">
                                                      활성화
                                                    </span>
                                                </label>
                                                <label class="form-check form-check-inline">
                                                    <input class="form-check-input" type="radio" name="useYn" value="N" <c:if test="${info.useYn eq 'N'}">checked="checked"</c:if>>
                                                    <span class="form-check-label">
                                                      비활성화
                                                    </span>
                                                </label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <th>최종접속일시</th>
                                            <td>
                                                <c:out value="${info.lastLoginTime}" />
                                            </td>
                                            <th>등록일시</th>
                                            <td>
                                                <c:out value="${info.createDate}" />
                                            </td>
                                        </tr>
                                    </table>
                                    <div class="row mt-3">
                                        <div class="col-12">
                                            <div class="text-right">
                                                <button class="btn btn-outline-primary w100" onclick="location.href='./list';">취소</button>
                                                <button class="btn btn-primary w100">등록</button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- 환자관리 : 신규환자 등록 END -->
                </div>
            </main>

            <jsp:include page="${data._INCLUDE}/footer.jsp"></jsp:include>
        </div>
    </div>
</body>
</html>