webmcp
view demo-app/app/main/index/login.lua @ 4:5e32ef998acf
Version 1.0.4
ui.link{...} with POST target can now be parameterized with BOTH content and text to allow HTML content for JavaScript browsers and a text-only version for accessiblity
Changes related to database selectors:
- Support for row-based locking
- New method :count(), caching and returning the number of rows, which WOULD have been returned by :exec()
- Bugfix: WHERE and HAVING expressions are now enclosed in parenthesis to avoid problems with operator precedence
ui.script{...} now supports external .js files
Changes in langtool.lua to cope with escaped new-line chars (\n)
ui.link{...} with POST target can now be parameterized with BOTH content and text to allow HTML content for JavaScript browsers and a text-only version for accessiblity
Changes related to database selectors:
- Support for row-based locking
- New method :count(), caching and returning the number of rows, which WOULD have been returned by :exec()
- Bugfix: WHERE and HAVING expressions are now enclosed in parenthesis to avoid problems with operator precedence
ui.script{...} now supports external .js files
Changes in langtool.lua to cope with escaped new-line chars (\n)
| author | jbe/bsw |
|---|---|
| date | Fri Dec 25 12:00:00 2009 +0100 (2009-12-25) |
| 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)
