sysLogin.jsp 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <%@ page contentType="text/html;charset=UTF-8" %>
  2. <%@ include file="/webpage/include/taglib.jsp"%>
  3. <!-- _login_page_ --><!--登录超时标记 勿删-->
  4. <html>
  5. <head>
  6. <meta name="decorator" content="ani"/>
  7. <title>${fns:getConfig('productName')} 登录</title>
  8. <script>
  9. if (window.top !== window.self) {
  10. window.top.location = window.location;
  11. }
  12. </script>
  13. <script type="text/javascript">
  14. $(document).ready(function() {
  15. $("#loginForm").validate({
  16. rules: {
  17. validateCode: {remote: "${pageContext.request.contextPath}/servlet/validateCodeServlet"}
  18. },
  19. messages: {
  20. username: {required: "请填写用户名."},password: {required: "请填写密码."},
  21. validateCode: {remote: "验证码不正确.", required: "请填写验证码."}
  22. },
  23. errorLabelContainer: "#messageBox",
  24. errorPlacement: function(error, element) {
  25. error.appendTo($("#loginError").parent());
  26. }
  27. });
  28. });
  29. // 如果在框架或在对话框中,则弹出提示并跳转到首页
  30. if(self.frameElement && self.frameElement.tagName == "IFRAME" || $('#left').length > 0){
  31. alert('未登录或登录超时。请重新登录,谢谢!');
  32. top.location = "${ctx}";
  33. }
  34. </script>
  35. </head>
  36. <body>
  37. <div class="login-page" style="background-color: #105f3f">
  38. <div class="row" style="background-color: #105f3f">
  39. <div class="col-md-4 col-lg-4 col-md-offset-4 col-lg-offset-4">
  40. <img src="${ctxStatic}/common/images/home.png" />
  41. <sys:message content="${message}" showType="1"/>
  42. <form id="loginForm" role="form" action="${ctx}/login" method="post">
  43. <div class="form-content">
  44. <div class="form-group">
  45. <input type="text" id="username" name="username" class="form-control input-underline input-lg required" value="admin" placeholder="用户名">
  46. </div>
  47. <div class="form-group">
  48. <input type="password" id="password" name="password" value="admin" class="form-control input-underline input-lg required" placeholder="密码">
  49. </div>
  50. <c:if test="${isValidateCodeLogin}">
  51. <div class="form-group text-muted">
  52. <label class="inline"><font color="white">验证码:</font></label>
  53. <sys:validateCode name="validateCode" inputCssStyle="margin-bottom:5px;" buttonCssStyle="color:white"/>
  54. </div>
  55. </c:if>
  56. <ul class="pull-right btn btn-info btn-circle" style="background-color:white;height:45px;width:46px">
  57. <li class="dropdown color-picker" >
  58. <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
  59. <span><i class="fa fa-circle"></i></span>
  60. </a>
  61. <ul class="dropdown-menu pull-right animated fadeIn" role="menu">
  62. <li class="padder-h-xs">
  63. <table class="table color-swatches-table text-center no-m-b">
  64. <tr>
  65. <td class="text-center colorr">
  66. <a href="#" data-theme="blue" class="theme-picker">
  67. <i class="fa fa-circle blue-base"></i>
  68. </a>
  69. </td>
  70. <td class="text-center colorr">
  71. <a href="#" data-theme="green" class="theme-picker">
  72. <i class="fa fa-circle green-base"></i>
  73. </a>
  74. </td>
  75. <td class="text-center colorr">
  76. <a href="#" data-theme="red" class="theme-picker">
  77. <i class="fa fa-circle red-base"></i>
  78. </a>
  79. </td>
  80. </tr>
  81. <tr>
  82. <td class="text-center colorr">
  83. <a href="#" data-theme="purple" class="theme-picker">
  84. <i class="fa fa-circle purple-base"></i>
  85. </a>
  86. </td>
  87. <td class="text-center color">
  88. <a href="#" data-theme="midnight-blue" class="theme-picker">
  89. <i class="fa fa-circle midnight-blue-base"></i>
  90. </a>
  91. </td>
  92. <td class="text-center colorr">
  93. <a href="#" data-theme="lynch" class="theme-picker">
  94. <i class="fa fa-circle lynch-base"></i>
  95. </a>
  96. </td>
  97. </tr>
  98. </table>
  99. </li>
  100. </ul>
  101. </li>
  102. </ul>
  103. <label class="inline">
  104. <input type="checkbox" id="rememberMe" name="rememberMe" ${rememberMe ? 'checked' : ''} class="ace" />
  105. <span class="lbl"> 记住我</span>
  106. </label>
  107. </div>
  108. <input type="submit" class="btn btn-white btn-outline btn-lg btn-rounded progress-login" value="登录">
  109. &nbsp;
  110. <a href="${ctx}/sys/register" class="btn btn-white btn-outline btn-lg btn-rounded progress-login">注册</a>
  111. </form>
  112. </div>
  113. </div>
  114. </div>
  115. <script>
  116. $(function(){
  117. $('.theme-picker').click(function() {
  118. changeTheme($(this).attr('data-theme'));
  119. });
  120. });
  121. function changeTheme(theme) {
  122. $('<link>')
  123. .appendTo('head')
  124. .attr({type : 'text/css', rel : 'stylesheet'})
  125. .attr('href', '${ctxStatic}/common/css/app-'+theme+'.css');
  126. //$.get('api/change-theme?theme='+theme);
  127. $.get('${pageContext.request.contextPath}/theme/'+theme+'?url='+window.top.location.href,function(result){ });
  128. }
  129. $(".pull-right").attr("style","display:none");
  130. </script>
  131. <style>
  132. /*li.color-picker i {*/
  133. /*font-size: 24px;*/
  134. /*line-height: 30px;*/
  135. /*}*/
  136. /*.red-base {*/
  137. /*color: #D24D57;*/
  138. /*}*/
  139. /*.blue-base {*/
  140. /*color: #105f3f;*/
  141. /*}*/
  142. /*.green-base {*/
  143. /*color: #27ae60;*/
  144. /*}*/
  145. /*.purple-base {*/
  146. /*color: #957BBD;*/
  147. /*}*/
  148. /*.midnight-blue-base {*/
  149. /*color: #2c3e50;*/
  150. /*}*/
  151. /*.lynch-base {*/
  152. /*color: #6C7A89;*/
  153. /*}*/
  154. </style>
  155. </body>
  156. </html>