
<%@ 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"%>
<base href="<%=basePath%>">
<title>全局变量编辑</title>
<script type="text/javascript">
	$(function(){
		$("#myform").Validform({
			 tiptype:4,
			 datatype:{"objKey": /^\w+$/},
			 btnSubmit:"#submitButton"
		});
		//$('#objKey').keyup(trimkeyup);
	})
	
</script>
</head>
<body>
	<form action="${ctx}/dataObject/update.do" method="post" id="myform">
		<div class="main-container" id="main-container">
			<div class="panel-heading">编辑全局属性</div>
			<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" name="objScope" id="objScope" value="G" />
						<input type="hidden" id="objId" name="objId"
							value="${dataObject.objId}" />
						<!-- 存放表单的区域 -->
						<tr>
							<th>属性KEY<font color="red">*</font>：
							</th>
							<td><input type="text" name="objKey"
								value="${dataObject.objKey}" id="objKey" class="input" 
								datatype="objKey" nullmsg="请输入变量KEY！" errormsg="变量KEY只能输入字母、数字以及下划线！"
								onKeypress="javascript:if(event.keyCode == 32)event.returnValue = false;"/>
							</td>
						</tr>
						<tr>
							<th>属性名称<font color="red">*</font>：
							</th>
							<td><input type="text" name="objName"
								value="${dataObject.objName}" id="objName" class="input" 
								datatype="*1-12" nullmsg="请输入变量名称！" errormsg="变量名称不能超过12个汉字！"/></td>
						</tr>
						<tr>
							<th>属性值<font color="red">*</font>：
							</th>
							<td><input type="text" name="objValue"
								value="${dataObject.objValue}" id="objValue" class="input" 
								datatype="s1-500" nullmsg="请输入变量值！" errormsg="变量值不能超过500个字符！"/></td>
						</tr>
						<tr>
							<th>属性类型<font color="red">*</font>：
							</th>
							<td><input type="text" name="objType"
								value="${dataObject.objType}" id="objType" class="input" 
								datatype="s1-50" nullmsg="请输入变量类型！" errormsg="变量类型不能超过50个字符！"/></td>
						</tr>
						<tr>
							<th>备注：</th>
							<td><input type="text" name="objRemark"
								value="${dataObject.objRemark}" id="objRemark" class="input" /></td>
						</tr>
					</table>
					<div class="col-md-offset-1 col-md-9" style="text-align: center;">
						<a class="btn btn-sm btn-primary" id="submitButton"
							onclick="javascript:getReferenceForm(this).submit();">保存
							<i class="ace-icon fa fa-save bigger-110"></i></a> 
							<a class="btn btn-sm btn-primary"
							onclick="window.location='${ctx}/dataObject/list.do'">返回
							<i class="ace-icon fa fa-undo icon-on-right bigger-110"></i></a>
					</div>
				</div>

			</div>
		</div>
	</form>

</body>
</html>
