<%--
  Class Name : EgovMenuRegist.jsp
  Description : 메뉴정보 등록 화면
  Modification Information
 
      수정일         수정자                   수정내용
    -------    --------    ---------------------------
     2009.03.10    이용             최초 생성
     2011.08.31   JJY       경량환경 버전 생성
 
    author   : 공통서비스 개발팀 이용
    since    : 2009.03.10
--%>
<%@ page contentType="text/html; charset=utf-8"%> 
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> 
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<%@ taglib prefix="double-submit" uri="http://www.egovframe.go.kr/tags/double-submit/jsp" %>
<c:url var="ImgUrl" value="/images"/>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Language" content="ko" >
<title>메뉴정보등록</title>
<style type="text/css">
    h1 {font-size:12px;}
    caption {visibility:hidden; font-size:0; height:0; margin:0; padding:0; line-height:0;}
</style>
<script type="text/javascript" src="<c:url value="/validator.do" />"></script>
<validator:javascript formName="menuManageVO" staticJavascript="false" xhtml="true" cdata="false"/>
<script language="javascript1.2" type="text/javaScript">
<!--
/* ********************************************************
 * 입력처리 함수
 ******************************************************** */
function insertMenuManage(form) {
    if(!validateMenuManageVO(form)){            
        return;
    }else{
    	if(confirm("<spring:message code="common.save.msg" />")){
         form.action="<c:url value='/sym/mnu/mpm/EgovMenuRegistInsert.do'/>";
         form.submit();
    	}
    }
}

/* ********************************************************
 * 파일목록조회  함수
 ******************************************************** */
function searchFileNm() {
    document.all.tmp_SearchElementName.value = "progrmFileNm";
    window.open("<c:url value='/sym/prm/EgovProgramListSearch.do'/>",'','width=800,height=730');
}

/* ********************************************************
 * 목록조회  함수
 ******************************************************** */
function selectList(){
	document.searchForm.submit();
    //location.href = "<c:url value='/sym/mnu/mpm/EgovMenuManageSelect.do'/>";
}
/* ********************************************************
 * 파일명 엔터key 목록조회  함수
 ******************************************************** */
function press() {
    if (event.keyCode==13) {
        searchFileNm();    // 원래 검색 function 호출
    }
}
-->
</script>
</head>
<body>
<form:form commandName="menuManageVO" name="menuManageVO" method="post" action="${pageContext.request.contextPath}/sym/mnu/mpm/EgovMenuRegistInsert.do">
<double-submit:preventer tokenKey="someKey" />
<!-- 검색조건 유지 -->
<input type="hidden" name="tmp_SearchElementName" value="">
<input type="hidden" name="tmp_SearchElementVal" value="">
<input name="cmd" type="hidden" value="<c:out value='insert'/>">
<!-- 검색조건 유지 -->
    
	<div class="ad_content">
	<div class="ad_con_head">
		<div class="ad_head_text">
			<p class="today_txt">메뉴목록등록</p>
			<div class="ad_head_ment">
				<p class="today_last_txt"><span id="cnt_cate_list"></span></p>
			</div>
		</div>
	</div>
	<div class="ad_subcon" >
		<div class="main1_div2">
		<table class="main1_table">
				<tr>
					<th ><span class="star_t">*</span>메뉴번호</th>
					<td>
						<form:input path="menuNo" size="10" maxlength="10" title="메뉴No"/>
						<form:errors path="menuNo" />
					</td>
					<th ><span class="star_t">*</span>메뉴순서</th>
					<td>
						<form:input path="menuOrdr" size="10"  maxlength="10" title="메뉴순서" />
						<form:errors path="menuOrdr" />
					</td>
				</tr>
				<tr>
					<th ><span class="star_t">*</span>메뉴명</th>
					<td>
						<form:input path="menuNm" size="30"  maxlength="30" title="메뉴명" />
						<form:errors path="menuNm" />
					</td>
					<th ><span class="star_t">*</span>상위메뉴번호</th>
					<td>
						<form:input path="upperMenuId" size="10"  maxlength="10" title="상위메뉴No"/>
						<form:errors path="upperMenuId" />
					</td>
				</tr>
				<tr>
					<th ><span class="star_t">*</span>프로그램파일명</th>
					<td colspan="3">
						<input type="text" name="progrmFileNm_view" size="60" disabled="disabled">
				        <form:input path="progrmFileNm" size="60"  maxlength="60" title="프로그램파일명" cssStyle="display:none"/>
				        <form:errors path="progrmFileNm" />
				        <a href="<c:url value='/sym/prm/EgovProgramListSearch.do'/>?tmp_SearchElementName=progrmFileNm" target="_blank" title="새창으로" onclick="javascript:searchFileNm(); return false;" style="selector-dummy:expression(this.hideFocus=false);" >
				        <img src="<c:url value='/images/img_search.gif' />" alt='프로그램파일명 검색' width="15" height="15" />
				        <span style="vertical-align: middle;">(프로그램파일명 검색)</span>
				        </a>
					</td>
				</tr>
				<tr>
					<th ><span class="star_t"></span>관련이미지명</th>
					<td>
						<form:input path="relateImageNm" size="30"  maxlength="30" title="관련이미지명"/>
						<form:errors path="relateImageNm" />
					</td>
					<th ><span class="star_t"></span>관련이미지경로</th>
					<td>
						<form:input path="relateImagePath" size="30"  maxlength="30" title="관련이미지경로"/>
						<form:errors path="relateImagePath" />
					</td>
				</tr>
				<tr>
					<th ><span class="star_t"></span>메뉴설명</th>
					<td colspan="3" class="td_txt_exist">
						<form:textarea path="menuDc" rows="2"  cssClass="txaClass" title="메뉴설명" style="width:100%;" />
						<form:errors path="menuDc"/>
					</td>
				</tr>
				<tr>
					<th class="td_title1"><span class="star_t"></span>페이지구분</th>
					<td colspan="3" class="td_txt_exist">
						<form:select path="menuUserType">
							<form:options items="${menuUserTypeList}" itemValue="code" itemLabel="codeNm"/>
						</form:select>
					</td>
				</tr>
			</table>
			
		</div>
		<div class="main1_btn_div">
			<button  class="main1_btn" onclick="selectList(); return false;" >목 록</button>
			<button class="main1_btn main1_save_btn" onclick="insertMenuManage(document.getElementById('menuManageVO')); return false;" >저 장</button>
		</div>	
	</div>
	</div>
</form:form>
<form name="searchForm" id="searchForm" method="get" action="<c:url value='/sym/mnu/mpm/EgovMenuManageSelect.do'/>" ></form>
</body>
</html>

