webmcp

view demo-app/app/main/index/login.lua @ 569:5b19007574de

New argument active_link_attr for env.ui.paginate{...}
author jbe
date Wed Oct 13 17:21:44 2021 +0200 (2021-10-13)
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