<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
<title>系统功能管理</title>
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no'
	name='viewport'>
<!-- bootstrap 3.0.2 -->
<link href="<c:url value='/styles/lib/bootstrap.min.css'/>" rel="stylesheet" type="text/css" />
<!-- font Awesome -->
<link href="<c:url value='/styles/lib/font-awesome.min.css'/>" rel="stylesheet" type="text/css" />
<!-- Ionicons -->
<link href='<c:url value='/styles/lib/ionicons.min.css' />' rel="stylesheet" type="text/css" />
<!-- DATA TABLES -->
<link href="<c:url value='/styles/lib/datatables/dataTables.bootstrap.css' />" rel="stylesheet" type="text/css" />
<!-- Theme style -->
<link href="<c:url value='/styles/AdminLTE.css'/>" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<c:url value='/scripts/lib/jquery-1.8.2.min.js'/>"></script>
<script type="text/javascript">

	$(document).keyup(function(event){ debugger
		if (event.ctrlKey && event.keyCode == 122){ 
		    $('#syscode').show();
		} 
	}); 

	$(function(){
		$("#btn-save").bind("click",function(){
			if(isNaN($("#orderNumber").val())){
				alert("排序号请输入数字");
				return;
			}
			
			$("#conditionform").submit();
		});
	});
	

	
</script>
</head>
<body>
	<div class="col-md-6" style="width:50%;">
		<!-- general form elements disabled -->
		<div class="box box-warning">
			<div class="box-header">
				<h3 class="box-title">编辑系统功能 &nbsp;&nbsp; <strong font-color="red">${errormsg}</strong></h3>
			</div>
			<!-- /.box-header -->
			<div class="box-body">
				<form:form action="${ctx}/admin/function/form" modelAttribute="appFunction" method="post" id="conditionform" >
					<form:hidden path="id" name="id" id="id" />
					<input type="hidden" name="actType" value="save">
					<input type="hidden" name="funcid" value="${funcid}">
					<div class="form-group" style="width:100%;">
						<label>功能名称</label>
						<form:input path="functionName" cssClass="form-control" />
					</div>
					<div class="form-group">
						<label>URL路径</label>
						<form:input path="url" cssClass="form-control" />
					</div>
					<!-- 
					<div class="form-group">
						<label>状态</label> 
						<form:select path="status" cssClass="form-control">
							<form:option value="1">启用</form:option>
							<form:option value="0">禁用</form:option>
						</form:select>
					</div>
					 -->
					<div class="form-group">
						<label>排序号</label> 
						<form:input path="orderNumber" cssClass="form-control" id="orderNumber" />
					</div>
					<div class="form-group">
						<label>是否手机端功能</label> 
						<form:select path="isApp" cssClass="form-control">
							<form:option value="0">否</form:option>
							<form:option value="1">是</form:option>
						</form:select>
					</div>
					<div id ='syscode' class="form-group" style="display: none">
						<label>系统编码</label>
						<form:input path="systemcode" cssClass="form-control syscode" />
					</div>
					<div class="form-group">
						<a class="btn btn-primary" href="#" id='btn-save'>保存</a>
						<a class="btn btn-back" href="<c:url value='/admin/function/list?funcid=${funcid}' />">返回</a>
					</div>
				</form:form>
			</div>
			<!-- /.box-body -->
		</div>
		<!-- /.box -->
	</div>
</body>
</html>