<%--
  - Author(s)  : Hyung min Son
  - Date       : 2014.06.18
  - Description: 수정요청  사유 팝업
  --%>

<%@page import="monfox.toolkit.snmp.agent.modules.SnmpV2Mib.SysOREntry"%>
<%@ page contentType="text/html; charset=utf-8" %>
<%@ page import="kr.co.udapsoft.common.*" %>
<%@ page import="com.udapsoft.waf.system.*" %>
<%@ page import="com.udapsoft.waf.common.*" %>
<%@ page import="com.udapsoft.waf.common.ui.HTMLMaker" %>
<%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
<%@ page import="kr.co.hsnc.common.util.*"%>
<%@ page import="kr.co.hsnc.common.util.ValueObject" %>
<%@ page import="kr.co.hsnc.common.sql.*" %>
<%@ page import="kr.co.hsnc.common.sql.RowSet" %>
<%@ page import="kr.co.hsnc.common.sql.util.*" %>

<%-- <%@ include file="/jsp/work/taglib.jsp" %> --%>

<jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />

<%
	ctx.init(request, response); 
	HandlerStorage storage = ctx.getHandlerStorage();
	ValueObject params = storage.getParams();
	ValueObject user = ctx.getUser();
	String SUB_CONT_MOD_ID =   (String) storage.get("SUB_CONT_MOD_ID");
%>

<%@ page contentType="text/html; charset=utf-8" %>
<SCRIPT language="JavaScript">

	function doPageInit() {
		
	}
	
	function doClose()
	{
     	returnValue = null;
     	parent.EditCallReasonClose(returnValue);
	}

	function goRtn(){
		if($("#MODI_REQ_REASON").val().length > 0){
			replace();
			var f = document.form1;
			submitXmlRequest("/portal/cont/SuppContDetail_form.screen", "EDIT_CALL", f);
		}else{
			alert("수정요청 사유는 필수 입니다.");
		}
	}
	
	function replace(){
		var content = $("#MODI_REQ_REASON").val();
		content = content.replace(/\r\n/g, '<br>');
		content = content.replace(/\n/g, '<br>');
		content = content.replace(/\r/g, '<br>');
		$("#MODI_REQ_REASON").val(content);
	}
	

	function doResult(resultObj) {
		try {
			if( resultObj.getRequestEvent() == "EDIT_CALL") {
				if( resultObj.getSuccess() ) {
					alert("수정요청 되었습니다.");
					returnValue = new Array(0,"OK");
					parent.EditCallReasonClose(returnValue);
				}
				else {
					dlgErrorMsg(resultObj);
				}
			}
		}
		catch(errorObject) {
			showErrorDlg("doResult()", errorObject);
		}
	}
	document.body.onload = doPageInit;


</SCRIPT>
<STYLE>
BODY {
	padding : 0 0 0 0;
}
</STYLE>
<modular:search id="form1">
	<modular:key id="fevent" />
</modular:search>

<FORM name="form1" method="post" style="width:580px">
<INPUT type="hidden" name="SUB_CONT_MOD_ID" value="<%=SUB_CONT_MOD_ID%>">
<INPUT type="hidden" name="fevent" id="fevent" value="EDIT_CALL">
  
<table  id="t1" width="100%" border="0" cellspacing="0" cellpadding="0" class="ftit_table">
	<colgroup>
		<col width="150" />
		<col width="*" />
	</colgroup>
	<tr>
   		<td align="right">
       		<span class="btnSearch center" id="btnSearch"><a href="javascript:goRtn();">수정요청</a></span>
			<span class="btnSearch center" id="btnSearch"><a href="javascript:doClose();">닫기</a></span>
   		</td>
  	</tr>
</table>  

<TABLE cellspacing="1" cellpadding="0" class="search_table">
		<colgroup>
			<col width="150" />
			<col width="85%" />
		</colgroup>
  <TR height="150"> 
    <TD class="search_table_title" style="text-align:center">수정요청 사유</TD>
	<TD class="search_table_data"><textarea name="MODI_REQ_REASON" id="MODI_REQ_REASON" style="width:99%; height:140px; overflow-y:auto" maxlength="1000" class="input byteChk ctrlTarget"></textarea></TD>
  </TR>
</TABLE>
</FORM>
