<!DOCTYPE HTML> <html> <head> <title>Radio Helsinki - Automation Import</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content="Importtool for Radio Helsinki"> <meta name="author" content="Christian Pointner <equinox@ffgraz.net>"> <link href="/javascript/twitter-bootstrap/css/bootstrap.css" rel="stylesheet"> <link href="/styles/signin.css" rel="stylesheet"> <style type="text/css"> body { background-color: #eee; padding-top: 60px; padding-bottom: 40px; } .sidebar-nav { padding: 9px 0; } </style> <link href="/javascript/twitter-bootstrap/css/bootstrap-responsive.css" rel="stylesheet"> <script src="/javascript/jquery/jquery.min.js"></script> <script type="text/javascript"> function authSuccess(data) { if (data.status == 'OK') { alert("username: " + data.username + "\ntoken: " + data.token ); } else { alert("login error: " + data.errorstring); } } function authError(req, status, error) { alert(status + ": '" + error + "'") } function auth() { $.ajax("/authtoken.json", { cache: false, username: $("#username").val(), password: $("#password").val(), dataType: "json", error: authError, success: authSuccess }); } </script> </head> <body> <div class="container"> <form id="loginform" class="form-signin" role="form"> <img src="/img/helsinki.png" /> <h1 class="form-signin-heading">Radio Helsinki - Import</h1> <input id="username" type="text" class="form-control" placeholder="Benutzername" required autofocus> <input id="password" type="password" class="form-control" placeholder="Passwort" required> <button class="btn btn-primary btn-large" type="submit"><i class="icon-user icon-white"></i> Einloggen</button> </form> </div> <script type="text/javascript"> $("#loginform").submit(function(event) { auth(); event.preventDefault(); }); </script> </body> </html>