<%@page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script type="text/javascript" src="<c:url value='/resources/js/admin/agreement.js' />"></script>
<!-- 관리자 계정관리 -->
<div class="main-wrapper">
    <div class="title-bar">
    	<span class="title">서비스약관</span>
    </div>
    <div id="wrapper">
    	<div class="col-md-6">
    		<div class="left-content">
    			<div class="table-wrapper-lg">
		    		<table class="table table-bordered table-hover table-row-click">
						<thead>
							<tr>
								<!-- <td class="table-header">약관아이디</td> -->
								<td class="table-header">이름</td>
								<td class="table-header">순서</td>
								<td class="table-header">버전</td>
								<td class="table-header">내용</td>
								<!-- <td class="table-header">필수여부</td> -->
								<td class="table-header">활성화여부</td>
								<!-- <td class="table-header">약관유형</td> -->
							</tr>
						</thead>
						<tbody id="table_agreement">
						</tbody>
					</table>
				</div>
				<nav class="text-center nav-pagination">
				  <ul class="pagination pagination-sm" id="ulPagination">
				  </ul>
				</nav>
			</div>	
    	</div>
    	<div class="col-md-6">
    		<div class="right-content row">
    			<div class="col-md-12" id="agreementDetailEmpty" style="display: none">
    				<div class="form-group col-md-12 text-right">
				    	<div class="btn-group" role="group" aria-label="...">
						  <button type="button" class="btn btn-default btn-sm" id="btnCreateEmpty" title="추가">
						  	<span class="glyphicon glyphicon-plus">&nbsp;추가</span>
						  </button>
						</div>
					</div>
					<div class="form-group col-md-12 pd0">
						<div class="col-md-12 pd0">
							* 약관 정보를 선택해주세요.
						</div>
					</div>
				</div>
    			<div id="agreementDetail">
	    			<input type="text" id="txtSeq" style="display: none">
		    		<div class="form-group col-md-12 text-right">
				    	<div class="btn-group" role="group" aria-label="...">
						  <button type="button" class="btn btn-default btn-sm" id="btnCreate" title="추가">
						  	<span class="glyphicon glyphicon-plus">&nbsp;추가</span>
						  </button>
						  <!-- <button type="button" class="btn btn-default btn-sm" id="btnRemove" title="삭제">
						  	<span class="glyphicon glyphicon-remove">&nbsp;삭제</span>
						  </button> -->
						  <button type="button" class="btn btn-default btn-sm" id="btnSave" title="저장">
						  	<span class="glyphicon glyphicon-ok">&nbsp;저장</span>
						  </button>
						</div>
					</div>
					<div class="col-md-12">
						<div class="panel panel-default">
							<div class="panel-body">
								<div class="form-group col-md-12 mgt10">
									<div class="col-md-2 content-title text-right pdl0 pdr0">
										<label>아이디</label>
									</div>
									<div class="col-md-10">
										<input type="text" class="form-control input-sm" id="txtAgreementId"/>
									</div>
								</div>
								<div class="form-group col-md-12">
									<div class="col-md-2 content-title text-right pdl0 pdr0">
										<label>이름</label>
									</div>
									<div class="col-md-10">
										<input type="text" class="form-control input-sm" id="txtAgreementName"/>
									</div>
								</div>
								<div class="form-group col-md-12">
									<div class="col-md-2 content-title text-right pdl0 pdr0">
										<label>순서</label>
									</div>
									<div class="col-md-10">
										<input type="number" class="form-control input-sm" id="txtAgreementOrder"/>
									</div>
								</div>
								<div class="form-group col-md-12">
									<div class="col-md-2 content-title text-right pdl0 pdr0">
										<label>내용</label>
									</div>
									<div class="col-md-10">
										<textarea class="form-control input-sm" id="txtAgreementCl" rows="10"></textarea>
									</div>
								</div>
								<div class="form-group col-md-12">
									<div class="col-md-2 content-title text-right pdl0 pdr0">
										<label>필수여부</label>
									</div>
									<div class="col-md-10">
										<label class="radio-inline"><input type="radio" name="requiredYn" value="Y" checked>Y</label>
										<label class="radio-inline"><input type="radio" name="requiredYn" value="N">N</label>
									</div>
								</div>
								<div class="form-group col-md-12">
									<div class="col-md-2 content-title text-right pdl0 pdr0">
										<label>활성화여부</label>
									</div>
									<div class="col-md-10">
										<label class="radio-inline"><input type="radio" name="enabledYn" value="Y" checked>Y</label>
										<label class="radio-inline"><input type="radio" name="enabledYn" value="N">N</label>
									</div>
								</div>
								<div class="form-group col-md-12">
									<div class="col-md-2 content-title text-right pdl0 pdr0">
										<label>유형</label>
									</div>
									<div class="col-md-10">
										<select class="form-control input-sm" id="sltTypeName">
											<option value="ALL">일반</option>
					    					<option value="UNDER14">14세이하</option>
					    				</select>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
    	</div>
    </div>
</div>
<script type="text/javascript">
$(document).ready(function () {
	var agreement = new mplus_admin_agreement();
	agreement.init();	
});
</script>