<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>KGCMS企业应用管理平台 - Powered by KGCMS</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="renderer" content="webkit">
<!-- <meta http-equiv="cache-control" content="no-siteapp" /> -->
<link rel="stylesheet" type="text/css" href="{{kg['tpl_url']}}style/role_update.css">
<script src="{{kg['tpl_url']}}script/jquery.min.js"></script>
<script src="{{kg['server']['HTTP_HOST']}}/tools/amazeui/js/amazeui.min.js"></script>
<script src="{{kg['tpl_url']}}script/amazeui.tree.min.js"></script>
<script src="{{kg['tpl_url']}}script/common.js"></script>
<script src="{{kg['tpl_url']}}script/role_update.js"></script>
</head>
<body data-type="generalComponents">
	{% include 'component_header.tpl' %}
	<div class="tpl-page-container tpl-page-header-fixed">
		<div class="scrollbar-wrap">
		{% include 'component_left.tpl' %}
		<div class="tpl-content-wrapper">
			<div class="tpl-content-page-title">
				{{kg['lang'][action][0]}}
			</div>
			<ol class="am-breadcrumb">
				<li><a href="./" class="am-icon-home">首页</a></li>
				<li><a href="role_manage">角色管理</a></li>
				<li class="am-active">{{kg['lang'][action][1]}}</li>
			</ol>
			<div class="tpl-portlet-components">
				<div class="portlet-title">
					<div class="caption font-green bold">
						<span class="am-icon-code"></span>&nbsp;{{kg['lang'][action][2]}}
					</div>
				</div>
				<div class="tpl-block">
					<div class="am-g">
						<div class="tpl-form-body tpl-form-line">
							<form class="am-form tpl-form-line-form" method="post" action="#" enctype="multipart/form-data">
								<div class="am-form-group am-form-icon am-form-feedback">
									<label for="description" class="am-u-sm-3 am-form-label">角色名称&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Name
										</span></label>
									<div class="am-u-sm-6 am-u-sm-pull-3">
										<input type="text" class="tpl-form-input  ngco_Ojs_bitian" id="name" name="name" value="{{data['name']}}">
										<i class=""></i>
									</div>
								</div>
								<div class="am-form-group">
									<label for="description" class="am-u-sm-3 am-form-label">角色描述&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Description
										</span></label>
									<div class="am-u-sm-6 am-u-sm-pull-3">
										<input type="text" class="tpl-form-input" id="description" name="description" value="{{data['description']}}">
									</div>
								</div>
								<div class="am-form-group">
									<label for="all-input" class="am-u-sm-3 am-form-label">所有权限&nbsp;/&nbsp;<span class="tpl-form-line-small-title">Jurisdiction
										</span></label>
									<div class="tpl-switch">
										{% if data['type'] == 99 %}
										<input name="permission" id="all-input" type="checkbox" checked="checked" class="ios-switch bigswitch tpl-switch-btn">
										{% else %}
										<input name="permission" id="all-input" type="checkbox" class="ios-switch bigswitch tpl-switch-btn">
										{% endif %}
										<div class="tpl-switch-btn-view" id="all-checkbox">
											<div>
											</div>
										</div>
									</div>
								</div>
								<div class="am-form-group">
									<div class="am-u-sm-9 am-u-sm-push-3 am-paddingl-8">
										<table class="am-table am-table-striped am-table-hover table-main" id="list">
											<thead>
												<tr>
													<th>权限模块</th>
													<th>查看</th>
													<th>发布</th>
													<th>修改</th>
													<th>删除</th>
													<th>清空</th>
													<th>审核</th>
													<th>推荐</th>
													<th>排序</th>
													<th>导出</th>
													<th>公有</th>
												</tr>
											</thead>
											<tbody>
												{% for var in module %}
												<tr class="am-collapse-1">
													<td>
														<div class="tpl-switch tpl-switch-first">
															{% if data['type'] == 99 or data['permission'][var]['open'] == 1 %}
															<input name="{{var}}_open" type="checkbox" checked="checked" class="ios-switch bigswitch tpl-switch-btn">
															{% else %}
															<input name="{{var}}_open" type="checkbox" class="ios-switch bigswitch tpl-switch-btn">
															{% endif %}
															<div class="tpl-switch-btn-view child">
																<div>
																</div>
															</div>
														</div>
														<span>{{module[var]['title']}}
														</span>
													</td>
													<td>
														{% if "read" in module[var]['permission'] %}
														<div class="tpl-switch">
															{% if data['type'] == 99 or 'read' in data['permission'][var]['list'] %}
															<input name="{{var}}" value="read" checked="checked" type="checkbox" class="ios-switch bigswitch tpl-switch-btn">
															{% else %}
															<input name="{{var}}" value="read" type="checkbox" class="ios-switch bigswitch tpl-switch-btn">
															{% endif %}
															{% else %}
															<div class="tpl-switch notclick">
																<input name="is_default" value="" id="" type="radio" class="ios-switch bigswitch tpl-switch-btn notclick">
																{% endif %}
																<div class="tpl-switch-btn-view">
																	<div>
																	</div>
																</div>
															</div>
													</td>
													<td>
														{% if "publish" in module[var]['permission'] %}
														<div class="tpl-switch">
															{% if data['type'] == 99 or 'publish' in data['permission'][var]['list'] %}
															<input name="{{var}}" value="publish" type="checkbox" checked="checked" class="ios-switch bigswitch tpl-switch-btn">
															{% else %}
															<input name="{{var}}" value="publish" type="checkbox" class="ios-switch bigswitch tpl-switch-btn">
															{% endif %}
															{% else %}
															<div class="tpl-switch notclick">
																<input name="is_default" type="radio" class="ios-switch bigswitch tpl-switch-btn notclick">
																{% endif %}
																<div class="tpl-switch-btn-view">
																	<div>
																	</div>
																</div>
															</div>
													</td>
													<td>
														{% if "edit" in module[var]['permission'] %}
														<div class="tpl-switch">
															{% if data['type'] == 99 or 'edit' in data['permission'][var]['list'] %}
															<input name="{{var}}" value="edit" type="checkbox" checked="checked" class="ios-switch bigswitch tpl-switch-btn">
															{% else %}
															<input name="{{var}}" value="edit" type="checkbox" class="ios-switch bigswitch tpl-switch-btn">
															{% endif %}
															{% else %}
															<div class="tpl-switch notclick">
																<input name="is_default" type="radio" class="ios-switch bigswitch tpl-switch-btn notclick">
																{% endif %}
																<div class="tpl-switch-btn-view">
																	<div>
																	</div>
																</div>
															</div>
													</td>
													<td>
														{% if "delete" in module[var]['permission'] %}
														<div class="tpl-switch">
															{% if data['type'] == 99 or 'delete' in data['permission'][var]['list'] %}
															<input name="{{var}}" value="delete" type="checkbox" checked="checked" class="ios-switch bigswitch tpl-switch-btn">
															{% else %}
															<input name="{{var}}" value="delete" type="checkbox" class="ios-switch bigswitch tpl-switch-btn">
															{% endif %}
															{% else %}
															<div class="tpl-switch notclick">
																<input name="is_default" type="radio" class="ios-switch bigswitch tpl-switch-btn notclick">
																{% endif %}
																<div class="tpl-switch-btn-view">
																	<div>
																	</div>
																</div>
															</div>
													</td>
													<td>
														{% if "clear" in module[var]['permission'] %}
														<div class="tpl-switch">
															{% if data['type'] == 99 or 'clear' in data['permission'][var]['list'] %}
															<input name="{{var}}" value="clear" type="checkbox" checked="checked" class="ios-switch bigswitch tpl-switch-btn">
															{% else %}
															<input name="{{var}}" value="clear" type="checkbox" class="ios-switch bigswitch tpl-switch-btn">
															{% endif %}
															{% else %}
															<div class="tpl-switch notclick">
																<input name="is_default" type="radio" class="ios-switch bigswitch tpl-switch-btn notclick">
																{% endif %}
																<div class="tpl-switch-btn-view">
																	<div>
																	</div>
																</div>
															</div>
													</td>
													<td>
														{% if "audit" in module[var]['permission'] %}
														<div class="tpl-switch">
															{% if data['type'] == 99 or 'audit' in data['permission'][var]['list'] %}
															<input name="{{var}}" value="audit" type="checkbox" checked="checked" class="ios-switch bigswitch tpl-switch-btn">
															{% else %}
															<input name="{{var}}" value="audit" type="checkbox" class="ios-switch bigswitch tpl-switch-btn">
															{% endif %}
															{% else %}
															<div class="tpl-switch notclick">
																<input name="is_default" type="radio" class="ios-switch bigswitch tpl-switch-btn notclick">
																{% endif %}
																<div class="tpl-switch-btn-view">
																	<div>
																	</div>
																</div>
															</div>
													</td>
													<td>
														{% if "recom" in module[var]['permission'] %}
														<div class="tpl-switch">
															{% if data['type'] == 99 or 'recom' in data['permission'][var]['list'] %}
															<input name="{{var}}" value="recom" type="checkbox" checked="checked" class="ios-switch bigswitch tpl-switch-btn ">
															{% else %}
															<input name="{{var}}" value="recom"  type="checkbox" class="ios-switch bigswitch tpl-switch-btn ">
															{% endif %}
															{% else %}
															<div class="tpl-switch notclick">
																<input name="is_default" type="radio" class="ios-switch bigswitch tpl-switch-btn notclick">
																{% endif %}
																<div class="tpl-switch-btn-view">
																	<div>
																	</div>
																</div>
															</div>
													</td>
													<td>
														{% if "sort" in module[var]['permission'] %}
														<div class="tpl-switch">
															{% if data['type'] == 99 or 'sort' in data['permission'][var]['list'] %}
															<input name="{{var}}" value="sort" type="checkbox" checked="checked" class="ios-switch bigswitch tpl-switch-btn">
															{% else %}
															<input name="{{var}}" value="sort" type="checkbox" class="ios-switch bigswitch tpl-switch-btn">
															{% endif %}
															{% else %}
															<div class="tpl-switch notclick">
																<input name="is_default" type="radio" class="ios-switch bigswitch tpl-switch-btn notclick">
																{% endif %}
																<div class="tpl-switch-btn-view">
																	<div>
																	</div>
																</div>
															</div>
													</td>
													<td>
														{% if "output" in module[var]['permission'] %}
														<div class="tpl-switch">
															{% if data['type'] == 99 or 'output' in data['permission'][var]['list'] %}
															<input name="{{var}}" value="output" type="checkbox" checked="checked" class="ios-switch bigswitch tpl-switch-btn">
															{% else %}
															<input name="{{var}}" value="output" type="checkbox" class="ios-switch bigswitch tpl-switch-btn">
															{% endif %}
															{% else %}
															<div class="tpl-switch notclick">
																<input name="is_default" type="radio" class="ios-switch bigswitch tpl-switch-btn notclick">
																{% endif %}
																<div class="tpl-switch-btn-view">
																	<div>
																	</div>
																</div>
															</div>
													</td>
													<td>
														{% if "public" in module[var]['permission'] %}
														<div class="tpl-switch">
															{% if data['type'] == 99 or 'output' in data['permission'][var]['list'] %}
															<input name="is_default" value="public" type="checkbox" checked="checked" class="ios-switch bigswitch tpl-switch-btn">
															{% else %}
															<input name="is_default" value="public" type="checkbox" class="ios-switch bigswitch tpl-switch-btn">
															{% endif %}
															{% else %}
															<div class="tpl-switch notclick">
																<input name="is_default" type="radio" class="ios-switch bigswitch tpl-switch-btn notclick">
																{% endif %}
																<div class="tpl-switch-btn-view">
																	<div>
																	</div>
																</div>
															</div>
													</td>
												</tr>
												{% endfor %}
											</tbody>
										</table>
										<input name="action" value="submit" type="hidden" />
									</div>
								</div>
								<div class="am-form-group">
									<div class="am-u-sm-9 am-u-sm-push-3 tpl-submit">
										<button type="submit" id="ngro-Hform-submit" class="am-btn am-btn-primary tpl-btn-bg-color-success">{{kg['lang'][action][3]}}</button>
									</div>
								</div>
							</form>
						</div>
					</div>
				</div>
			</div>
			{% include 'component_footer.tpl' %}
		</div>
		</div><!-- /.scrollbar-wrap -->
	</div>
</body>
</html>