liquid_feedback_frontend

view app/main/index/login.lua @ 1304:0bae319805ff

Added tag v3.2.1 for changeset 0160d9a01d0a
author jbe
date Fri May 06 09:44:16 2016 +0200 (2016-05-06)
parents 904f6807f7fa
children 32cc544d5a5b
line source
1 ui.tag{
2 tag = "noscript",
3 content = function()
4 slot.put(_"JavaScript is disabled or not available.")
5 end
6 }
8 ui.title(_"Login")
9 app.html_title.title = _"Login"
11 execute.view{ module = "index", view = "_sidebar_motd_public" }
13 ui.section(function()
15 ui.sectionHead(function()
16 ui.heading{ level = 1, content = _"Login" }
17 ui.container { attr = { class = "right" }, content = function()
18 for i, lang in ipairs(config.enabled_languages) do
19 local langcode
20 locale.do_with({ lang = lang }, function()
21 langcode = _("[Name of Language]")
22 end)
24 if i > 1 then
25 slot.put(" | ")
26 end
28 ui.link{
29 content = function()
30 ui.tag{ content = langcode }
31 end,
32 module = "index",
33 action = "set_lang",
34 params = { lang = lang },
35 routing = {
36 default = {
37 mode = "redirect",
38 module = request.get_module(),
39 view = request.get_view(),
40 id = request.get_id_string(),
41 params = request.get_param_strings()
42 }
43 }
44 }
45 end
46 end }
47 end)
48 ui.form{
49 module = 'index',
50 action = 'login',
51 routing = {
52 ok = {
53 mode = 'redirect',
54 module = param.get("redirect_module") or "index",
55 view = param.get("redirect_view") or "index",
56 id = param.get("redirect_id"),
57 },
58 error = {
59 mode = 'forward',
60 module = 'index',
61 view = 'login',
62 }
63 },
64 content = function()
65 ui.sectionRow(function()
66 ui.field.text{
67 attr = { id = "username_field" },
68 label = _'Login name',
69 name = 'login',
70 value = ''
71 }
72 ui.script{ script = 'document.getElementById("username_field").focus();' }
73 ui.field.password{
74 label = _'Password',
75 name = 'password',
76 value = ''
77 }
78 ui.container { attr = { class = "actions" }, content = function()
79 ui.tag{
80 tag = "input",
81 attr = {
82 type = "submit",
83 class = "btn btn-default",
84 value = _'Login'
85 },
86 content = ""
87 }
88 slot.put("<br />")
89 slot.put("<br />")
90 ui.link{ module = "index", view = "reset_password", text = _"Forgot password?" }
91 slot.put("&nbsp;&nbsp;")
92 ui.link{ module = "index", view = "send_login", text = _"Forgot login name?" }
93 end }
94 end )
95 end
96 }
97 end )

Impressum / About Us