  <%@ page contentType="text/html;charset=UTF-8"%>
<%@page import="com.blueland.bpm.engine.config.model.*" %>
<%@ include file="/commons/taglibs.jsp"%>
<%
	String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ include file="/commons/meta.jsp"%>
<head>
<base href="<%=basePath%>">
<title>消息提醒配置编辑</title>
<script type="text/javascript">
	
	function chooseRemindType(){
		var value = $("#remindType").val();
		if(value=='1'){//不接收提醒
			$("#isReceiveSms").val("N");
			$("#isReceiveMail").val("N");
			showRemindInfoType('hide');
			setRemindInfoType('N');
		}else if(value=='2'){//接收短信提醒
			$("#isReceiveSms").val("Y");
			$("#isReceiveMail").val("N");
			showRemindInfoType('show');
		}else{//接收邮件提醒
			$("#isReceiveSms").val("N");
			$("#isReceiveMail").val("Y");
			showRemindInfoType('show');
		}
	}
	
	function showRemindInfoType(flag){
		if(flag=="show"){
			$("#isReceiveTodo").show();
			$("#isReceiveReader").show();
		}else{
			$("#isReceiveTodo").hide();
			$("#isReceiveReader").hide();
		}
	}
	
	//批量设置为否（是否接收待办到达提醒信息   是否接收待阅到达提醒）
	function setRemindInfoType(value){
		//alert($("input[name='isReceiveTodo']:checked").val());
		//$("input[type='radio'][name='isReceiveTodo'][value='Y']").attr("checked", "");
		$("input[type='radio'][name='isReceiveTodo'][value='N']").attr("checked", "checked");
		//$("input[type='radio'][name='isReceiveReader'][value='Y']").attr("checked", "");
		$("input[type='radio'][name='isReceiveReader'][value='N']").attr("checked", "checked");
	}

	function remindProcessDefNameOnDbClick(name, value) {
		$("#remindProcessDefName").val(name);
		$("#remindProcessDefKey").val(value);
	}
</script>
</head>
<body>
	<form action="${ctx}/msgRemind/update.do" method="post">
	<input type="hidden" name="remindUserId"
	value="${msgRemind.remindUserId}"
	id="remindUserId" class="input" />
	
	<input type="hidden" name="remindAppId"
	value="${msgRemind.remindAppId}"
	id="remindAppId" class="input" />
	
	<!-- 是否接收短信提醒 -->
		<input type="hidden" name="isReceiveSms" id="isReceiveSms" value="${msgRemind.isReceiveSms}"/>
		<!-- 是否接收邮件提醒 -->
		<input type="hidden" name="isReceiveMail" id="isReceiveMail" value="${msgRemind.isReceiveSms}"/>
		<div class="main-container" id="main-container">
				<div class="panel panel-primary">
					<div class="panel-body">
						<table class='table table-bordered' border="0" cellspacing="0" cellpadding="0" id="myTable">
							<!-- 存放隐藏域的区域 -->
							<input type="hidden" id="remindId"
								name="remindId"
								value="${msgRemind.remindId}" />
							<!-- 存放表单的区域 -->
	  							<tr>
									<th style="width: 120px;">提醒流程定义：
									</th>
									<td style="width: 440px;">
										${procdefname}
									</td>
								</tr>
								<tr>
									<th>是否接收提醒：
									</th>
									<td>
										<c:choose>
											<c:when test='${"Y"==msgRemind.isReceiveSms}'>接收短信提醒</c:when>
											<c:when test='${"Y"==msgRemind.isReceiveMail}'>接收邮件提醒</c:when>
											<c:otherwise>不接收提醒</c:otherwise>
										</c:choose>
									</td>
								</tr>
	  							<tr id="isReceiveTodo"> 
									<th>待办到达提醒：
									</th>
									<td>
										<c:choose>
											<c:when test='${"Y"==msgRemind.isReceiveTodo}'>接收</c:when>
											<c:otherwise>拒绝</c:otherwise>
										</c:choose>
									</td>
								</tr>
	  							<tr id="isReceiveReader">
									<th>待阅到达提醒：
									</th>
									<td>
											<c:choose>
											<c:when test='${"Y"==msgRemind.isReceiveReader}'>接收</c:when>
											<c:otherwise>拒绝</c:otherwise>
										</c:choose>
									</td>
								</tr>
	  						<!-- 	<tr>
									<th>提醒所属系统<font
										color="red">*</font>：
									</th>
									<td><input type="text" name="remindAppId"
										value="${msgRemind.remindAppId}"
										id="remindAppId" class="input" /></td>
								</tr> -->
	  							<tr>
									<th>提醒模版内容：
									</th>
									<td>${msgRemind.remindTempContent}</td>
								</tr>
						</table>
					</div>
					<div class="col-md-offset-1 col-md-9" style="text-align: center;">
						<a class="btn btn-sm btn-primary"
						onclick="art.dialog.close();"><i
						class="icon icon-close"></i>关闭</a>
					</div>
				</div>
			</div>
							
	</form>
<jsp:include page="../../pages/procDefMgr/procDefTree.jsp" flush="false" />
</body>
</html>
