File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
<%--
Class Name : EgovItnQustnrQestnManageRegist.jsp
Description : 설문문항 등록 페이지
Modification Information
수정일 수정자 수정내용
------- -------- ---------------------------
2008.03.09 장동한 최초 생성
2011.08.31 JJY 경량환경 버전 생성
author : 공통서비스 개발팀 장동한
since : 2009.03.19
--%>
<%@ 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" %>
<c:set var="ImgUrl" value="/images/egovframework/com/uss/olp/qqm/"/>
<!DOCTYPE html>
<html>
<head>
<title>설문문항 등록</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="content-language" content="ko">
<script type="text/javascript" src="<c:url value="/validator.do"/>"></script>
<validator:javascript formName="qustnrQestnManageVO" staticJavascript="false" xhtml="true" cdata="false"/>
<script type="text/javascript" src="<c:url value='/js/showModalDialog.js'/>" ></script>
<script type="text/javaScript" language="javascript">
/* ********************************************************
* 목록 으로 가기
******************************************************** */
function fn_egov_list_QustnrQestnManage(){
var varFrom = document.getElementById("qustnrQestnManageVO");
varFrom.action = "<c:url value='/uss/olp/qqm/EgovQustnrQestnManageList.do'/>";
varFrom.submit();
}
/* ********************************************************
* 저장처리화면
******************************************************** */
function fn_egov_save_QustnrQestnManage(form){
if(confirm("<spring:message code="common.save.msg" />")){
if(form.qestnrCn.value == "" ||
form.qestnrTmplatId.value == "" ||
form.qestnrId.value == ""
){
alert("설문지정보를 입력해주세요!");
form.qestnrCn.focus();
return;
}
if(!validateQustnrQestnManageVO(form)){
return;
}else{
form.submit();
}
}
}
/* ********************************************************
* 설문지정보 팝업창열기
******************************************************** */
function fn_egov_QustnrManageListPopup_QustnrQestnManage(){
window.showModalDialog("<c:url value='/uss/olp/qmc/EgovQustnrManageListPopup.do'/>", self,"dialogWidth=800px;dialogHeight=500px;resizable=yes;center=yes");
}
/* ********************************************************
* 설문문제
******************************************************** */
function addRow(){
var oRow = itemTable.insertRow();
th = document.createElement('th');
th.innerHTML = itemTable.rows.length;;
oRow.appendChild(th);
var oCell2 = oRow.insertCell();
oCell2.innerHTML = "<input type='text' name='iemCn' style='width:90%; float:left;' maxlength='50' />";
}
function delRow(){
if(itemTable.rows.length==0)
{
alert("삭제 할 문항이 없습니다.");
}else{
itemTable.deleteRow(itemTable.rows.length-1);
}
}
/* ********************************************************
* 설문문제저장
******************************************************** */
function fn_egov_save_QustnrItemManage(cmd){
var varFrom = document.getElementById("qustnrItemManageVO");
var iemCnCheck = false;
var message = "등록하시겠습니까?";
var logParam = "I";
if(cmd == "upda"){
message = "수정하시면 이전의 설문결과\n정보가 초기화 됩니다.\n\n수정하시겠습니까?" ;
logParam = "U";
}
if(confirm(message)){
varFrom.action = "/uss/olp/qim/EgovQustnrItemManageRegist.do?logParam="+logParam;
if(varFrom.qestnCn.value == ""){
alert("질문내용을 입력해주세요!");
return;
}
if(varFrom.qestnSn.value == ""){
alert("질문순번이 없습니다.");
return;
}
{
$("input[name=iemCn]").each(function(idx){
var value = $(this).val();
console.log(value);
if(value == ""){
iemCnCheck = true;
return false;
}
});
if(iemCnCheck){
alert("설문문항정보를 입력해주세요!");
return ;
}
}
varFrom.cmd.value= cmd;
varFrom.method = "post" ;
varFrom.submit();
}
}
function fnList() {
document.searchForm.submit();
}
</script>
</head>
<body>
<!-- 자바스크립트 경고 태그 -->
<noscript class="noScriptTitle">자바스크립트를 지원하지 않는 브라우저에서는 일부 기능을 사용하실 수 없습니다.</noscript>
<form name="qustnrItemManageVO" id="qustnrItemManageVO" action="${pageContext.request.contextPath}/uss/olp/qqm/EgovQustnrQestnManageRegist.do" method="get">
<input name="qestnrId" type="hidden" value="${qustnrQestnManageVO.qestnrId}">
<input name="qestnrTmplatId" type="hidden" value="${qustnrQestnManageVO.qestnrTmplatId}">
<input name="qestnrQesitmId" type="hidden" value="${qustnrQestnManageVO.qestnrQesitmId}">
<input name="cmd" type="hidden" value="">
<div class="contWrap">
<div class="pageTitle">
<div class="pageIcon"><img src="/pb/img/pageTitIcon4.png" alt=""></div>
<h2 class="titType1 c_222222 fwBold">설문문항 등록</h2>
<p class="tType6 c_999999">설문조사에 사용하는 문항을 등록한다.</p>
</div>
<div class="pageCont">
<div>
<span class="tbTit">설문지 수정</span>
<p class="right block fwMd"><span class="tType4 c_e40000 fwBold">*</span>는 필수입력 항목입니다.</p>
<table class="tbType2">
<colgroup>
<col style="width: 20%">
<col style="width: 80%">
</colgroup>
<tbody>
<tr>
<th><span class="reqArea">설문지정보(제목)</span></th>
<td>
<c:out value="${qestnrInfo.qustnrSj}" escapeXml="true"/>
<input type="hidden" name="qestnrCn" id="qestnrCn" value="${qestnrInfo.qustnrSj}" />
</td>
</tr>
<tr>
<th><span class="reqArea">질문 내용</span></th>
<td>
<input type="text" name="qestnCn" id="qestnCn" maxlength="50" value="${qestnrInfo.qestnCn}"/>
</td>
</tr>
<tr>
<th><span class="reqArea">질문 순번</span></th>
<td>
${qustnrQestnManageVO.qestnSn}
<input type="hidden" name="qestnSn" id="qestnSn" value="${qustnrQestnManageVO.qestnSn}">
</td>
</tr>
<tr>
<th><span class="reqArea">질문 유형</span></th>
<td>
<select id="qestnTyCode" name="qestnTyCode" title="질문유형 선택">
<c:forEach items="${cmmCode018}" var="comCodeList" varStatus="status">
<option value="${comCodeList.code}" <c:if test="${qestnrInfo.qestnTyCode == comCodeList.code }"> selected="selected" </c:if>> ${comCodeList.codeNm}</option>
</c:forEach>
</select>
</td>
</tr>
<tr>
<th><span class="reqArea">최대선택건수</span></th>
<td>
<select id="mxmmChoiseCo" name="mxmmChoiseCo" title="최대선택건수 선택">
<option value="1" <c:if test="${qestnrInfo.mxmmChoiseCo == '1' }"> selected="selected" </c:if>>1</option>
<option value="2" <c:if test="${qestnrInfo.mxmmChoiseCo == '2' }"> selected="selected" </c:if>>2</option>
<option value="3" <c:if test="${qestnrInfo.mxmmChoiseCo == '3' }"> selected="selected" </c:if>>3</option>
<option value="4" <c:if test="${qestnrInfo.mxmmChoiseCo == '4' }"> selected="selected" </c:if>>4</option>
<option value="5" <c:if test="${qestnrInfo.mxmmChoiseCo == '5' }"> selected="selected" </c:if>>5</option>
<option value="6" <c:if test="${qestnrInfo.mxmmChoiseCo == '6' }"> selected="selected" </c:if>>6</option>
<option value="7" <c:if test="${qestnrInfo.mxmmChoiseCo == '7' }"> selected="selected" </c:if>>7</option>
<option value="8" <c:if test="${qestnrInfo.mxmmChoiseCo == '8' }"> selected="selected" </c:if>>8</option>
<option value="9" <c:if test="${qestnrInfo.mxmmChoiseCo == '9' }"> selected="selected" </c:if>>9</option>
<option value="10" <c:if test="${qestnrInfo.mxmmChoiseCo == '10' }"> selected="selected" </c:if>>10</option>
</select>
</td>
</tr>
</tbody>
</table>
<div>
</div>
</div>
<div>
<span class="tbTit">설문문항</span>
<table class="tbType2" id="itemTable">
<colgroup>
<col style="width: 20%">
<col style="width: 80%">
</colgroup>
<tbody>
<c:choose>
<c:when test="${fn:length(qustnrItemList) < 1}">
<tr>
<th>1</th>
<td>
<input type="text" name="iemCn" maxlength="50" />
</td>
</tr>
<tr>
<th>2</th>
<td>
<input type="text" name="iemCn" maxlength="50" />
</td>
</tr>
</c:when>
<c:otherwise>
<c:forEach var="resultList" items="${qustnrItemList}" varStatus="status">
<tr>
<th>${status.count}</th>
<td>
<input type="text" name="iemCn" maxlength="50" value="${resultList.iemCn}"/>
</td>
</tr>
</c:forEach>
</c:otherwise>
</c:choose>
</tbody>
</table>
</div>
<div class="btnWrap">
<input type="button" class="btnType2" value="문항추가" onclick="addRow(); return false;">
<input type="button" class="btnType2" value="문항삭제" onclick="delRow(); return false;">
<input type="button" class="btnType1" value="이전페이지" onclick="fnList(); return false;">
<c:choose>
<c:when test="${fn:length(qustnrItemList) == 0}">
<input type="button" class="btnType1" value="저장" onclick="fn_egov_save_QustnrItemManage('regi'); return false; ">
</c:when>
<c:otherwise>
<input type="button" class="btnType1" value="수정" onclick="fn_egov_save_QustnrItemManage('upda'); return false; ">
</c:otherwise>
</c:choose>
</div>
</div>
</div>
</form>
<form name="searchForm" id="searchForm" method="get" action="<c:url value='/uss/olp/qmc/EgovQustnrManageModify.do'/>" >
<input name="qestnrId" type="hidden" value="${qustnrQestnManageVO.qestnrId}" />
</form>
</body>
</html>