webmcp

view demo-app/app/main/index/login.lua @ 23:3a6fe8663b26

Code cleanup and documentation added; Year in copyright notice changed to 2009-2010

Details:
- Changed quoting style in auth.openid.xrds_document{...}
- Fixed documentation for auth.openid.initiate{...}
- Added documentation for mondelefant
- Code-cleanup in mondelefant:
-- removed unneccessary lines "rows = PQntuples(res); cols = PQnfields(res);"
-- avoided extra copy of first argument (self) in mondelefant_conn_query
-- no rawget in meta-method "__index" of database result lists and objects
-- removed unreachable "return 0;" in meta-method "__newindex" of database result lists and objects
- Year in copyright notice changed to 2009-2010
- Version string changed to "1.1.1"
author jbe
date Fri Jun 04 19:00:34 2010 +0200 (2010-06-04)
parents 9fdfb27f8e67
children
line source
1 slot.put_into("title", encode.html(_"Password login"))
3 slot.select("main", function()
5 ui.form{
6 attr = { class = "vertical" },
7 module = "index",
8 action = "login",
9 routing = {
10 default = {
11 mode = "redirect",
12 module = "index",
13 view = "index"
14 }
15 },
16 content = function()
18 ui.container{
19 attr = { class = "lang_chooser" },
20 content = function()
21 for i, lang in ipairs{"en", "de", "es"} do
22 ui.container{
23 content = function()
24 ui.link{
25 content = function()
26 ui.image{
27 static = "lang/" .. lang .. ".png",
28 attr = { alt = lang }
29 }
30 slot.put(lang)
31 end,
32 module = "index",
33 view = "login",
34 params = { lang = lang }
35 }
36 end
37 }
38 end
39 end
40 }
42 ui.field.text{ label = _"Username", name = "ident" }
43 ui.field.text{ label = _"Password", name = "password" }
44 ui.submit{ text = _"Login" }
45 end
46 }
47 end)

Impressum / About Us