288 lines
12 KiB
Plaintext
288 lines
12 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
|
<div id="kccf-main-content" class="content">
|
|
<div class="content">
|
|
<form id="insertForm" name="insertForm" action="/sec/lcltt/insertLcltt.do" method="post">
|
|
<input type="hidden" name="searchAreaCode" value="${searchVO.searchAreaCode}">
|
|
<input type="hidden" name="searchLclttNm" value="${searchVO.searchLclttNm}">
|
|
<input type="hidden" name="pageNo" value="${searchVO.pageNo}">
|
|
<table class="table table-data mb-0">
|
|
<colgroup>
|
|
<col style="width: 15%; min-width: 140px;">
|
|
<col>
|
|
<col style="width: 15%; min-width: 140px;">
|
|
<col>
|
|
</colgroup>
|
|
<tr>
|
|
<th>
|
|
<label>문화원 ID</label>
|
|
</th>
|
|
<td colspan="3">
|
|
<div class="row-df">
|
|
<input type="text" class="form-control form-control-sm mr-1" id="lclttId" name="lclttId" value="${lclttVO.lclttId }" readonly="readonly" placeholder="문화원 ID는 자동으로 등록 됩니다.">
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>
|
|
<label class="requiredText">문화원명</label>
|
|
</th>
|
|
<td colspan="3">
|
|
<div class="row-df">
|
|
<input type="text" class="form-control form-control-sm mr-1" id="lclttNm" name="lclttNm" value="${lclttVO.lclttNm }">
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>
|
|
<label class="requiredText">지역</label>
|
|
</th>
|
|
<td>
|
|
<div class="row-df">
|
|
<input type="hidden" id="hiddenAreaCode" name="hiddenAreaCode" value="${lclttVO.areaCode }" />
|
|
<select class="form-control form-control-sm" id="areaCode" name="areaCode" />
|
|
<option value="">전체</option>
|
|
<c:forEach items="${areaCodeList}" var="areaCodeList">
|
|
<option value="${areaCodeList.detailCode}">${areaCodeList.detailCodeNm}</option>
|
|
</c:forEach>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>
|
|
<label class="requiredText">주소</label>
|
|
</th>
|
|
<td colspan="3">
|
|
<div class="row-df">
|
|
<input class="form-control form-control-sm mr-1" type="text" name="zip" id="zip" value="${lclttVO.zip }" style="width: 100px;" readonly="readonly"/>
|
|
<input class="form-control form-control-sm mr-1" type="text" name="adres1" id="adres1" value="${lclttVO.adres1 }"/>
|
|
<input class="form-control form-control-sm mr-1" type="text" name="adres2" id="adres2" value="${lclttVO.adres2 }" style="width: 400px;"/>
|
|
<button type="button" id="openPopupBtn" name="openPopupBtn" class="btn btn-primary" onclick="goPopup()">선택</button>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>
|
|
<label class="requiredText">홈페이지 URL</label>
|
|
</th>
|
|
<td>
|
|
<div class="row-df">
|
|
<input class="form-control form-control-sm mr-1" type="text" name="hmpgUrl" id="hmpgUrl" value="${lclttVO.hmpgUrl }"/>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>
|
|
<label class="requiredText">전화번호</label>
|
|
</th>
|
|
<td>
|
|
<div class="row-df">
|
|
<input class="form-control form-control-sm" type="text" name="telno" id="telno" value="${lclttVO.telno }"/>
|
|
</div>
|
|
</td>
|
|
<th>
|
|
<label>팩스번호</label>
|
|
</th>
|
|
<td colspan="3">
|
|
<div class="row-df">
|
|
<input class="form-control form-control-sm" type="text" name="fxnum" id="fxnum" value="${lclttVO.fxnum }"/>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>
|
|
<label>이메일</label>
|
|
</th>
|
|
<td>
|
|
<div class="row-df">
|
|
<input class="form-control form-control-sm" type="text" name="email" id="email" value="${lclttVO.email }"/>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>
|
|
<label>설립일자</label>
|
|
</th>
|
|
<td>
|
|
<div class="input-group mt-1" style="width: 170px;">
|
|
<input type="text" data-plugin-datepicker="" class="form-control form-control-sm" id="fondDe" name="fondDe" value="${lclttVO.fondDe }">
|
|
<span class="input-group-append">
|
|
<span class="input-group-text">
|
|
<label class="m-0" for="fondDe">
|
|
<i class="icon-calendar"></i>
|
|
</label>
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>
|
|
<label class="requiredText">원장성명</label>
|
|
</th>
|
|
<td>
|
|
<input class="form-control form-control-sm" type="text" name="ledgrNm" id="ledgrNm" value="${lclttVO.ledgrNm }"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>
|
|
<label>내용</label>
|
|
</th>
|
|
<td colspan="3">
|
|
<div class="row-df">
|
|
<textarea class="form-control" rows="" cols="" id="cntntsCn" name="cntntsCn">${lclttVO.cntntsCn }</textarea>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>
|
|
<label class="requiredText">사용여부</label>
|
|
</th>
|
|
<td colspan="3">
|
|
<div class="row-df">
|
|
<input type="hidden" id="hiddenUseYn" name="hiddenUseYn" value="${lclttVO.useYn}" />
|
|
<div class="radio-custom mt-1 mb-1">
|
|
<input type="radio" id="useYnY" name="useYn" value="Y" checked="checked">
|
|
<label class="ml-0 mr-2" for="useYnY">사용</label>
|
|
</div>
|
|
<div class="radio-custom mt-1 mb-1">
|
|
<input type="radio" id="useYnN" name="useYn" value="N">
|
|
<label class="ml-0 mr-2" for="useYnN">미사용</label>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>
|
|
<label>작성일자</label>
|
|
</th>
|
|
<td>
|
|
<div class="row-df">
|
|
<input class="form-control form-control-sm" type="text" name="regDttm" id="regDttm" value="${lclttVO.regDttm }" readonly="readonly"/>
|
|
</div>
|
|
</td>
|
|
<th>
|
|
<label>작성자</label>
|
|
</th>
|
|
<td>
|
|
<div class="row-df">
|
|
<c:choose>
|
|
<c:when test="${empty lclttVO.lclttId}">
|
|
<input class="form-control form-control-sm" type="text" name="regUserNm" id="regUserNm" readonly="readonly" value="${user.userNm}"/>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<input class="form-control form-control-sm" type="text" name="regUserNm" id="regUserNm" readonly="readonly" value="${lclttVO.regUserNm}"/>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
|
|
<div class="row-df justify-content-center mt-3">
|
|
<c:if test="${searchVO.lclttId != null && searchVO.lclttId != ''}">
|
|
<button type="button" id="saveBtn" name="saveBtn" class="btn btn-default btn-primary" onclick="fnLclttDelete()">삭제</button>
|
|
</c:if>
|
|
<button type="button" id="saveBtn" name="saveBtn" class="btn btn-default btn-primary" onclick="fnLclttSave()">저장</button>
|
|
<button type="button" id="backBtn" name="backBtn" class="btn btn-default btn-secondary" onclick="fnList()">목록</button>
|
|
</div>
|
|
</div>
|
|
|
|
<form id="gotoListForm" name="gotoListForm" action="/sec/lcltt/lclttListPage.do" method="get">
|
|
<input type="hidden" name="lclttId" value="${searchVO.lclttId}">
|
|
<input type="hidden" name="searchAreaCode" value="${searchVO.searchAreaCode}">
|
|
<input type="hidden" name="searchLclttNm" value="${searchVO.searchLclttNm}">
|
|
<input type="hidden" name="pageNo" value="${searchVO.pageNo}">
|
|
</form>
|
|
</div>
|
|
|
|
<script>
|
|
$(document).ready(function() {
|
|
|
|
if($('#hiddenUseYn').val() == $('#useYnY').val()){
|
|
$('#useYnY').prop("checked", true);
|
|
}else{
|
|
$('#useYnN').prop("checked", true);
|
|
}
|
|
|
|
if($('#hiddenAreaCode').val() != null || $('#hiddenAreaCode').val() != ''){
|
|
$('form#insertForm select[name=areaCode]').val($('#hiddenAreaCode').val()).prop('selected', true);
|
|
}
|
|
|
|
|
|
});
|
|
|
|
function fnLclttDelete(){
|
|
var conf = confirm("정말로 삭제 하시겠습니까?");
|
|
if(conf){
|
|
$("form#gotoListForm").attr('action', '/sec/lcltt/deleteLcltt.do');
|
|
$("form#gotoListForm").submit();
|
|
alert("삭제가 정상적으로 완료되었습니다.");
|
|
}
|
|
}
|
|
|
|
function fnLclttSave(){
|
|
|
|
if($('#lclttNm').val() == null || $('#lclttNm').val() == ''){
|
|
alert('사업명을 입력해 주세요.');
|
|
$('#lclttNm').focus();
|
|
return false;
|
|
}
|
|
|
|
if($('#areaCode').val() == null || $('#areaCode').val() == ''){
|
|
alert('지역을 선택해 주세요.');
|
|
$('#areaCode').focus();
|
|
return false;
|
|
}
|
|
|
|
if($('#adres1').val() == null || $('#adres1').val() == ''){
|
|
alert('주소를 입력해 주세요.');
|
|
$('#adres1').focus();
|
|
return false;
|
|
}
|
|
|
|
if($('#hmpgUrl').val() == null || $('#hmpgUrl').val() == ''){
|
|
alert('홈페이지 URL 주소를 입력해 주세요.');
|
|
$('#hmpgUrl').focus();
|
|
return false;
|
|
}
|
|
|
|
if($('#telno').val() == null || $('#telno').val() == ''){
|
|
alert('전화번호를 입력해주세요.');
|
|
$('#telno').focus();
|
|
return false;
|
|
}
|
|
|
|
var conf = confirm("내용을 저장 하시겠습니까?");
|
|
|
|
if(conf){
|
|
$('form#insertForm').submit();
|
|
alert("정상적으로 저장 되었습니다.");
|
|
}
|
|
}
|
|
|
|
function goPopup(){
|
|
|
|
var token = $("meta[name='_csrf']").attr("content");
|
|
// 주소검색을 수행할 팝업 페이지를 호출합니다.
|
|
// 호출된 페이지(jusopopup.jsp)에서 실제 주소검색URL(https://business.juso.go.kr/addrlink/addrLinkUrl.do)를 호출하게 됩니다.
|
|
var pop = window.open("/juso/jusoPopup.do?_csrf="+token,"pop","width=570,height=420, scrollbars=yes, resizable=yes");
|
|
|
|
// 모바일 웹인 경우, 호출된 페이지(jusopopup.jsp)에서 실제 주소검색URL(https://business.juso.go.kr/addrlink/addrMobileLinkUrl.do)를 호출하게 됩니다.
|
|
//var pop = window.open("/popup/jusoPopup.jsp","pop","scrollbars=yes, resizable=yes");
|
|
}
|
|
|
|
|
|
function jusoCallBack(roadFullAddr,roadAddrPart1,addrDetail,roadAddrPart2,engAddr, jibunAddr, zipNo, admCd, rnMgtSn, bdMgtSn,detBdNmList,bdNm,bdKdcd,siNm,sggNm,emdNm,liNm,rn,udrtYn,buldMnnm,buldSlno,mtYn,lnbrMnnm,lnbrSlno,emdNo){
|
|
$('#zip').val(zipNo);
|
|
$('#adres1').val(roadAddrPart1);
|
|
$('#adres2').val(addrDetail+roadAddrPart2);
|
|
|
|
}
|
|
|
|
function fnList(){
|
|
$('form#gotoListForm').submit();
|
|
}
|
|
</script> |