liquid_feedback_frontend

view app/main/index/login.lua @ 813:ea2449916c12

Cleaned up public access levels
author bsw
date Fri Jul 06 13:58:20 2012 +0200 (2012-07-06)
parents f52f918b38b8
children 5a712ec1a7f1
line source
1 ui.tag{
2 tag = "noscript",
3 content = function()
4 slot.put(_"JavaScript is disabled or not available.")
5 end
6 }
8 execute.view{ module = "index", view = "_lang_chooser" }
10 ui.title(_"Login")
11 app.html_title.title = _"Login"
13 if config.motd_public then
14 local help_text = config.motd_public
15 ui.container{
16 attr = { class = "wiki motd" },
17 content = function()
18 slot.put(format.wiki_text(help_text))
19 end
20 }
21 end
23 if app.session:has_access("anonymous") then
24 ui.tag{
25 tag = 'p',
26 content = _'You need to be logged in, to use all features of this system.'
27 }
28 else
29 ui.tag{ tag = "p", content = _"Closed user group, please login to participate." }
30 end
32 ui.form{
33 attr = { class = "login" },
34 module = 'index',
35 action = 'login',
36 routing = {
37 ok = {
38 mode = 'redirect',
39 module = param.get("redirect_module") or "index",
40 view = param.get("redirect_view") or "index",
41 id = param.get("redirect_id"),
42 },
43 error = {
44 mode = 'forward',
45 module = 'index',
46 view = 'login',
47 }
48 },
49 content = function()
50 ui.field.text{
51 attr = { id = "username_field" },
52 label = _'login name',
53 html_name = 'login',
54 value = ''
55 }
56 ui.script{ script = 'document.getElementById("username_field").focus();' }
57 ui.field.password{
58 label = _'Password',
59 html_name = 'password',
60 value = ''
61 }
62 ui.submit{
63 text = _'Login'
64 }
65 end
66 }

Impressum / About Us