login.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <!doctype html>
  2. <html ng-app="eventManApp">
  3. <head>
  4. <title>EventMan{ager} - Login</title>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7. <script src="/static/js/jquery-2.1.3.min.js"></script>
  8. <script src="/static/js/bootstrap.min.js"></script>
  9. <link href="/static/css/normalize.css" rel="stylesheet">
  10. <link href="/static/css/bootstrap.css" rel="stylesheet">
  11. <link href="/static/css/bootstrap-theme.css" rel="stylesheet">
  12. <link href="/static/css/font-awesome-4.3.0/css/font-awesome.min.css" rel="stylesheet">
  13. <link href="/static/css/eventman.css" rel="stylesheet">
  14. </head>
  15. <!--
  16. Copyright 2015 Davide Alberani <da@erlug.linux.it>
  17. RaspiBO <info@raspibo.org>
  18. Licensed under the Apache License, Version 2.0 (the "License");
  19. you may not use this file except in compliance with the License.
  20. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
  21. Unless required by applicable law or agreed to in writing, software
  22. distributed under the License is distributed on an "AS IS" BASIS,
  23. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  24. See the License for the specific language governing permissions and
  25. limitations under the License.
  26. -->
  27. <body>
  28. <div class="container">
  29. <div class="panel panel-primary table-striped top5">
  30. <div class="panel-heading">Login</div>
  31. <div class="panel-body">
  32. <div id="wronglogin" class="alert alert-danger alert-dismissible hidden" role="alert">
  33. <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  34. <strong>Error!</strong> Wrong username and password.
  35. </div>
  36. <form method="POST">
  37. <div class="input-group input-group-lg">
  38. <span class="input-group-addon" style="min-width:150px;">Username</span>
  39. <input type="text" id="username" name="username" class="form-control" placeholder="admin">
  40. </div>
  41. <div class="input-group input-group-lg top10">
  42. <span class="input-group-addon" style="min-width:150px;">Password</span>
  43. <input type="password" id="password" name="password" class="form-control" placeholder="eventman">
  44. </div>
  45. <button type="submit" class="btn btn-success top10">login</button>
  46. </form>
  47. </div>
  48. </div>
  49. </div>
  50. </body>
  51. <script>
  52. function getUrlParameter(sParam) {
  53. var sPageURL = window.location.search.substring(1);
  54. var sURLVariables = sPageURL.split('&');
  55. for (var i = 0; i < sURLVariables.length; i++) {
  56. var sParameterName = sURLVariables[i].split('=');
  57. if (sParameterName[0] == sParam) {
  58. return sParameterName[1];
  59. }
  60. }
  61. }
  62. $(document).ready(function() {
  63. if (getUrlParameter('failed')) {
  64. $('#wronglogin').removeClass('hidden');
  65. }
  66. });
  67. </script>
  68. </html>