Advertisement
Guest User

Untitled

a guest
Oct 15th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.74 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="de">
  3. <head>
  4.     <meta charset="utf-8">
  5.     <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6.     <meta name="viewport" content="width=device-width, initial-scale=1">
  7.     <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
  8.     <title>Dreamlife Login</title>
  9.  
  10.     <!-- Bootstrap -->
  11.     <link href="../css/bootstrap.min.css" rel="stylesheet">
  12.     <link href="../css/style.css" rel="stylesheet">
  13. </head>
  14. <body>
  15.     <div class="container">
  16.         <div class="panel panel-default">
  17.             <div class="panel-heading">
  18.                 <h3 class="panel-title">Einloggen</h3>
  19.             </div>
  20.             <div class="panel-body">
  21.                 <div id="field-req" class="alert alert-danger" style="display: none;" role="alert">
  22.                     Test
  23.                 </div>
  24.                 <form>
  25.                     <div class="form-group">
  26.                         <label for="username">Socialclub</label>
  27.                         <input type="text" class="form-control" id="username" placeholder="username" maxlength="255">
  28.                     </div>
  29.                     <div class="form-group">
  30.                         <label for="password">Passwort</label>
  31.                         <input type="password" class="form-control" id="password" placeholder="Passwort" maxlength="16">
  32.                     </div>
  33.                     <button type="button" id="login" class="btn btn-success btn-block">Einloggen</button>
  34.                 </form>
  35.             </div>
  36.         </div>
  37.     </div>
  38.  
  39.     <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
  40.     <script src="../js/jquery.min.js"></script>
  41.     <!-- Include all compiled plugins (below), or include individual files as needed -->
  42.     <script src="../js/bootstrap.min.js"></script>
  43.     <script>
  44.         $(function () {
  45.             $("#login").click(function () {
  46.  
  47.                 var username = $("#username").val();
  48.                 var password = $("#password").val();
  49.  
  50.                 if (password === "") {
  51.                     showRequiredField("password");
  52.                     return;
  53.                 }
  54.  
  55.                 resourceCall("login", username, password);
  56.             });
  57.         });
  58.  
  59.         function showRequiredField(field) {
  60.             $("#field-req").text("Das Feld \"" + $("#" + field).attr("placeholder") + "\" muss ausgefüllt werden");
  61.             $("#" + field).focus();
  62.  
  63.             $("#field-req").show("slow", function () {
  64.                 $("#field-req").delay(5000).hide("slow");
  65.             });
  66.         }
  67.  
  68.         function setUsername(name) {
  69.             alert("test");
  70.             $("#username").val(name);
  71.         }
  72.     </script>
  73. </body>
  74. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement