summaryrefslogtreecommitdiff
path: root/index.html
blob: 8ebe5373c73a3bd1f166dc52adfec932f8b09aa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<!DOCTYPE HTML>
<html>
 <head>
  <title>Radio Helsinki - Automation Import</title>
  <meta charset="utf-8">
  <link rel="stylesheet" type="text/css" href="/styles/import.css" />
  <script src="/javascript/jquery/jquery.min.js"></script>
  <script type="text/javascript">
    function authSuccess(data) {
       alert("username: " + data.username + "\ntoken: " + data.token );
    }

    function auth()
    {
      $.get("/authtoken.json", authSuccess, "json");
    }

    $("#loginform").submit(function(event) {
      auth()
      event.preventDefault();
    });
  </script>
 </head>
 <body>
   <h1>Radio Helsinki - Automation Import</h1>
   <form id="loginform">
     <ul>
       <li> <label for="name">Benutzername:</label> <input type="text" id="username" value=""> </li>
       <li> <label for="pass">Kennwort:</label> <input type="password" id="password" value=""> </li>
       <li> <input type="submit" value="Einloggen"> </li>
     </ul>
   </form>

   <script type="text/javascript">
    $("#loginform").submit(function(event) { auth(); event.preventDefault(); });
   </script>
 </body>
</html>