Mercurial Hosting > chat
diff src/login.html.luan @ 5:a49866b52cc2
login to chat
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Tue, 29 Oct 2024 13:10:47 -0600 |
| parents | 2c63b10781e1 |
| children | 5a56297713a3 |
line wrap: on
line diff
--- a/src/login.html.luan Sun Oct 27 20:39:18 2024 -0600 +++ b/src/login.html.luan Tue Oct 29 13:10:47 2024 -0600 @@ -1,13 +1,20 @@ local Luan = require "luan:Luan.luan" local error = Luan.error +local ipairs = Luan.ipairs or error() +local Html = require "luan:Html.luan" +local html_encode = Html.encode or error() local Io = require "luan:Io.luan" local Http = require "luan:http/Http.luan" local Shared = require "site:/lib/Shared.luan" local head = Shared.head or error() local header = Shared.header or error() +local Utils = require "site:/lib/Utils.luan" +local to_list = Utils.to_list or error() return function() + local with = Http.request.parameters.with + with = to_list(with) Io.stdout = Http.response.text_writer() %> <!doctype html> @@ -21,6 +28,9 @@ <h1>Login / Register</h1> <p>A link to login will be emailed to you.</p> <form page onsubmit="ajaxForm('/login.js',this)" action="javascript:"> +<% for _, email in ipairs(with) do %> + <input type=hidden name=with value="<%=html_encode(email)%>"> +<% end %> <p> <label prompt>Your email address</label> <input type=email name=email required autofocus>
