<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>用户管理</title>
		<jsp:include page="../../../common.jsp"></jsp:include>
		<jsp:include page="../../../public.jsp"></jsp:include>
		<script type="text/javascript">
			var readOnly = '${param.readOnly}' === 'true';
			var user = null;
			var userRoleIds = [];
			var userRoles = [];
			var userProducts = [];
			var userPlatforms = [];
			var userProvinceId = null;
			var userCityId = null;
			var curUserId = "<shiro:principal property='id'/>";
			var curUserLoginName = "<shiro:principal property='loginName'/>";
		</script>
		<script type="text/javascript" src="${res}/js/user/editUser.js"></script>
		
		<style type="text/css">
		.nav-tabs > .active > a ,.nav-tabs > .active > a:hover,.nav-tabs > .active > a:focus{
			background-color: #0088cc;
			color : #fff;
		}
		</style>
	</head>
<body>

	
	<!-- [start]  device新增模态框 -->
 	<div class="modal hide fade" id="dataAuthModal">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"  >&times;</button>       
	        <h3 id="deviceModelTitle">权限配置 
		        <select id="organType" style="margin-left:40%;" name="organType" class="input-medium">
		        	<option value="order_meal">点餐</option>
					<option value="wifi_manage">wifi后台</option>
		        </select>
	        </h3>       
      </div>
      <div class="modal-body" id="modelBody">
      </div>
      <div class="modal-footer">
        <a id="addDevice" href="javascript:addOrgan()"  class="btn btn-primary">保存</a>
      </div>
	</div>
	<!-- [end]  device新增模态框 -->
	
	<div class="container-fluid">
		<div class="row-fluid">
			<ul class="breadcrumb">
				<li class="active">权限管理 <span class="divider">/</span></li>
				<li class="active">用户管理</li>
			</ul>
			<form id="user_form">
			<input type="hidden" id="OrganIdWifi" name="OrganWifiStr" value="">
			<input type="hidden" id="OrganIdMeal" name="OrganMealStr" value="">
			<input type="hidden" id="OrganId" name="OrganStr" value="">
			<div class="tabbable">
				<ul class="nav nav-tabs">
					<li class="active"><a href="#profile_tab" data-toggle="tab">基本信息</a></li>
				</ul>
				<div class="tab-content">
					<div class="tab-pane active" id="profile_tab">
						<input type="hidden" id="id" name="id" value="${userInfo.id }">
						<div class="form-horizontal">
							<div class="control-group">
								<label class="control-label" for="loginName">登录名:</label> 
								<div class="controls">
									<input type="text" id="loginName" name="loginName" value="${userInfo.loginName }" readonly="readonly">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label" for="trueName">用户姓名:</label> 
								<div class="controls">
									<input type="text" id="trueName" name="trueName" value="${userInfo.trueName }" readonly="readonly">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label" for="status">用户状态:</label> 
								<div class="controls">
								<input type="text" id="status" name="status" 
								value='<c:if test="${userInfo.status eq '1' }">有效</c:if><c:if test="${userInfo.status eq '0' }">无效</c:if>' readonly="readonly">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label">性别:</label>
								<div class="controls">
									<input type="text" id="sex_male" name="sex_male"
									 value='<c:if test="${userInfo.sex eq '1' }">女</c:if><c:if test="${userInfo.sex eq '0' }">男</c:if>' readonly="readonly">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label" for="phone">手机号:</label>
								<div class="controls">
									<input type="text" id="phone" name="phone" value="${userInfo.phone}" readonly="readonly">
								</div>
							</div>
							<div class="control-group">
								<label class="control-label" for="email">电子邮箱:</label>
								<div class="controls">
									<input type="text" id="email" name="email" value="${userInfo.email}" readonly="readonly">
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="tabbable">
				<ul class="nav nav-tabs">
					<li class="active"><a href="#data_tab" data-toggle="tab">数据权限</a></li>
				</ul>
				<div class="tab-content">
					<label class="control-label" style="float:left;text-indent:24px;">数据权限:</label>
						<!-- <a id="dataAuth" href="#" onclick="showModel(0);" data-toggle="modal" data-target="#dataAuthModal">&nbsp;&nbsp;权限配置</a>
				 -->
				</div>
			<div class="tabbable">
				<ul class="nav nav-tabs">
					<li class="active"><a href="#permission_tab" data-toggle="tab">操作权限</a></li>
				</ul>
				<div class="tab-content">
					<div class="tab-pane active" id="permission_tab">
						<div class="form-horizontal">
							<div class="control-group">
								<label class="control-label">操作权限:</label>
								<div class="controls" id="roles"  >
									<label class="checkbox inline">
										<input type="checkbox" id="role_{0}" value="{0}"> {1}
									</label>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="form-btns">
				<!-- <button type="button" class="btn btn-primary" id="btn_save">保存</button> -->
				<button type="button" class="btn btn-primary" onclick="history.go(-1);">返回</button>
			</div>
			<!--隐藏域  -->
			<input id="roleIds" name="roleIds" type="hidden">
			</form>
		</div>
	</div>

</body>
</html>