Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="de">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
- <title>Dreamlife Login</title>
- <!-- Bootstrap -->
- <link href="../css/bootstrap.min.css" rel="stylesheet">
- <link href="../css/style.css" rel="stylesheet">
- </head>
- <body>
- <div class="container">
- <div class="panel panel-default">
- <div class="panel-heading">
- <h3 class="panel-title">Einloggen</h3>
- </div>
- <div class="panel-body">
- <div id="field-req" class="alert alert-danger" style="display: none;" role="alert">
- Test
- </div>
- <form>
- <div class="form-group">
- <label for="username">Socialclub</label>
- <input type="text" class="form-control" id="username" placeholder="username" maxlength="255">
- </div>
- <div class="form-group">
- <label for="password">Passwort</label>
- <input type="password" class="form-control" id="password" placeholder="Passwort" maxlength="16">
- </div>
- <button type="button" id="login" class="btn btn-success btn-block">Einloggen</button>
- </form>
- </div>
- </div>
- </div>
- <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
- <script src="../js/jquery.min.js"></script>
- <!-- Include all compiled plugins (below), or include individual files as needed -->
- <script src="../js/bootstrap.min.js"></script>
- <script>
- $(function () {
- $("#login").click(function () {
- var username = $("#username").val();
- var password = $("#password").val();
- if (password === "") {
- showRequiredField("password");
- return;
- }
- resourceCall("login", username, password);
- });
- });
- function showRequiredField(field) {
- $("#field-req").text("Das Feld \"" + $("#" + field).attr("placeholder") + "\" muss ausgefüllt werden");
- $("#" + field).focus();
- $("#field-req").show("slow", function () {
- $("#field-req").delay(5000).hide("slow");
- });
- }
- function setUsername(name) {
- alert("test");
- $("#username").val(name);
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement