<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../common/init.jsp"%>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="${ctx }/resources/css/login.css" rel="stylesheet" type="text/css" />
<script src="${ctx }/resources/js/jquery-1.11.1.js"></script>
<title>系统登录-选择角色</title>
</head>
<body style="margin:0;">
<div id="login">
	<div class=" header-wrap"></div>
	<div class="banner">
		<div class="grid-1000 login-bgcolor">
  			<div class="login-box">
				<form id="login-form" method="post" action="${ctx}/setRole">
	 				<div class="input-group">
	        			<span class="input-group-addon">角色：</span>
	        			<select style="width: 160px; padding:6px; line-height:20px;" size="1.8px;" id="role" name="roleCode">
				          <c:forEach var="role" items="${roles }">
				              <option value="${role.code }">${role.name }</option>
				          </c:forEach>
				      	</select>
	       			</div>
				    <p class="button">
					    <a id="loginBtn" href="#">确认</a>
				    </p>
			    </form>
		    </div>
	    </div>
    </div>
	<div class="footer">
		<p>Copyright © 2011-2020 www.qmth.com.cn, All Rights Reserved</p>　
		<p>电话：027-87863577　客服邮箱：service@qmth.com.cn　建议使用：谷歌 、 火狐 或者 IE8及以上版本的浏览器</p>
	</div>
</div>
<script type="text/javascript">
$(function(){
	$('#role').val('${web_session_role.code}');
	$('#loginBtn').focus();
	$("body").keyup(function(){
	    if(event.keyCode == 13){
	    	$('#login-form').submit();
	    }
	});
	$("#role").change(function(){
		$('#login-form').submit();
	});
	$("#loginBtn").click(function(){
		$('#login-form').submit();
	});
});
</script>
</body>
</html>