studentBar.jsp 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <%--suppress JSUnresolvedFunction --%>
  2. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
  3. <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
  4. <%--suppress ALL --%>
  5. <%--
  6. Created by IntelliJ IDEA.
  7. User: Кинетик
  8. Date: 28.12.2016
  9. Time: 20:07
  10. To change this template use File | Settings | File Templates.
  11. --%>
  12. <%@page contentType="text/html" pageEncoding="UTF-8"%>
  13. <!DOCTYPE html>
  14. <html>
  15. <head>
  16. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  17. <title>Страница студента</title>
  18. <style type="text/css">
  19. <%@include file="/WEB-INF/bootstrap-4.0.0-alpha.6-dist/css/cssforpr.css" %>
  20. <%@include file="/WEB-INF/bootstrap-4.0.0-alpha.6-dist/css/bootstrap.min.css" %>
  21. </style>
  22. </head>
  23. <script type="text/javascript" charset="utf-8">
  24. $("select#groupId").change(function(){
  25. $.getJSON("/loadStudents",{groupId: $(this).val()}, function(j){
  26. var options = '';
  27. for (var i = 0; i < j.length; i++) {
  28. options += '<option value="' + j[i].stFamily + '">' + j[i].stFamily + '</option>';
  29. }
  30. $("select#studentId").html(options);
  31. });
  32. });
  33. $("select#groupId").change(function(){
  34. $.getJSON("/loadStudents",{groupId: $(this).val()}, function(j){
  35. var options = '';
  36. for (var i = 0; i < j.length; i++) {
  37. options += '<option value="' + j[i].stFamily + '">' + j[i].stFamily + '</option>';
  38. }
  39. $("select#studentId").html(options);
  40. });
  41. });
  42. </script>
  43. <body>
  44. <nav class="navbar navbar-default navbar-fixed-top">
  45. <div class="container">
  46. <a class="navbar-brand" href="#">MePhorce</a>
  47. <nav class="nav nav-masthead">
  48. <a class="nav-link" href="/">Войти</a>
  49. <a class="nav-link" href="/aboutUs">О проекте</a>
  50. <a class="nav-link" href="/registrate">Создать аккаунт</a>
  51. <a class="nav-link" href="/contacts">Контакты</a>
  52. </nav>
  53. </div>
  54. </nav>
  55. <div class="container">
  56. <div class="login-block">
  57. <h1>Вход как Исполнитель</h1>
  58. <form:form method="post" modelAttribute="studentLogin" action="checkStudent">
  59. <form:select id="groupId" path="">
  60. <c:forEach items="${groupList}" var="group">
  61. <form:option value="${group.groupId}" >${group.groupName}</form:option>
  62. </c:forEach><br/>
  63. </form:select>
  64. <form:select id="studentId" path="name">
  65. <form:option value="${group.groupId}" >${group.groupName}</form:option>
  66. </form:select>
  67. <form:input path="password" type="password" value="" placeholder="Пароль" id="password"/>${passMessage}<br/>
  68. <form:button>Войти</form:button>
  69. </form:form>
  70. </div>
  71. </div>
  72. <footer class="footer">
  73. <div class="container">
  74. <p class="text-muted">&copy;2017 Mephorce</p>
  75. </div>
  76. </footer>
  77. </body>
  78. </html>