|
0
|
1 local Luan = require "luan:Luan.luan"
|
|
|
2 local error = Luan.error
|
|
5
|
3 local ipairs = Luan.ipairs or error()
|
|
|
4 local Html = require "luan:Html.luan"
|
|
|
5 local html_encode = Html.encode or error()
|
|
0
|
6 local Io = require "luan:Io.luan"
|
|
|
7 local Http = require "luan:http/Http.luan"
|
|
|
8 local Shared = require "site:/lib/Shared.luan"
|
|
|
9 local head = Shared.head or error()
|
|
|
10 local header = Shared.header or error()
|
|
5
|
11 local Utils = require "site:/lib/Utils.luan"
|
|
|
12 local to_list = Utils.to_list or error()
|
|
0
|
13
|
|
|
14
|
|
|
15 return function()
|
|
|
16 Io.stdout = Http.response.text_writer()
|
|
|
17 %>
|
|
|
18 <!doctype html>
|
|
94
|
19 <html lang="en">
|
|
0
|
20 <head>
|
|
|
21 <% head() %>
|
|
40
|
22 <style>
|
|
|
23 input[name=email] {
|
|
|
24 width: 300px;
|
|
|
25 max-width: 100%;
|
|
|
26 }
|
|
44
|
27 [failed] {
|
|
|
28 color: red;
|
|
|
29 }
|
|
40
|
30 </style>
|
|
0
|
31 </head>
|
|
|
32 <body>
|
|
|
33 <% header() %>
|
|
|
34 <div content>
|
|
44
|
35 <h1>Password Login</h1>
|
|
|
36 <form page onsubmit="ajaxForm('/manual_login.js',this)" action="javascript:">
|
|
3
|
37 <p>
|
|
|
38 <label prompt>Your email address</label>
|
|
|
39 <input type=email name=email required autofocus>
|
|
|
40 </p>
|
|
|
41 <p>
|
|
44
|
42 <label prompt>Password</label>
|
|
|
43 <input name=password required>
|
|
|
44 </p>
|
|
|
45 <p>
|
|
3
|
46 <input type=submit>
|
|
|
47 </p>
|
|
44
|
48 <p failed></p>
|
|
3
|
49 </form>
|
|
0
|
50 </div>
|
|
|
51 </body>
|
|
|
52 </html>
|
|
|
53 <%
|
|
|
54 end
|