liquid_feedback_frontend

view app/main/index/login.lua @ 456:7d3f7aa90008

Show member names in event list only when logged in or pseudonym public mode
author bsw
date Sun Mar 11 18:56:28 2012 +0100 (2012-03-11)
parents 58647c8a0339
children f9b80c930456
line source
1 local warning_text = _"Some JavaScript based functions (voting in particular) will not work.\nFor this beta, please use a current version of Firefox, Safari, Chrome, Opera(?), Konqueror or another (more) standard compliant browser.\nAlternative access without JavaScript will be available soon."
3 ui.script{ static = "js/browser_warning.js" }
4 ui.script{ script = "checkBrowser(" .. encode.json(_"Your web browser is not fully supported yet." .. " " .. warning_text:gsub("\n", "\n\n")) .. ");" }
6 ui.tag{
7 tag = "noscript",
8 content = function()
9 slot.put(_"JavaScript is disabled or not available." .. " " .. encode.html_newlines(warning_text))
10 end
11 }
13 execute.view{ module = "index", view = "_lang_chooser" }
15 slot.put_into("title", encode.html(config.app_title))
16 app.html_title.title = _"Login"
19 if config.motd_public then
20 local help_text = config.motd_public
21 ui.container{
22 attr = { class = "wiki motd" },
23 content = function()
24 slot.put(format.wiki_text(help_text))
25 end
26 }
27 end
29 if config.public_access then
30 ui.tag{
31 tag = 'p',
32 content = _'You need to be logged in, to use all features of this system.'
33 }
34 else
35 ui.tag{ tag = "p", content = _"Closed user group, please login to participate." }
36 end
38 ui.form{
39 attr = { class = "login" },
40 module = 'index',
41 action = 'login',
42 routing = {
43 ok = {
44 mode = 'redirect',
45 module = param.get("redirect_module") or "index",
46 view = param.get("redirect_view") or "index",
47 id = param.get("redirect_id"),
48 },
49 error = {
50 mode = 'forward',
51 module = 'index',
52 view = 'login',
53 }
54 },
55 content = function()
56 ui.field.text{
57 attr = { id = "username_field" },
58 label = _'login name',
59 html_name = 'login',
60 value = ''
61 }
62 ui.script{ script = 'document.getElementById("username_field").focus();' }
63 ui.field.password{
64 label = _'Password',
65 html_name = 'password',
66 value = ''
67 }
68 ui.submit{
69 text = _'Login'
70 }
71 end
72 }
74 if config.auth_openid_enabled then
75 ui.form{
76 attr = { class = "login" },
77 module = 'openid',
78 action = 'initiate',
79 routing = {
80 default = {
81 mode = 'forward',
82 module = 'index',
83 view = 'login',
84 }
85 },
86 content = function()
87 ui.field.text{
88 label = _'OpenID',
89 html_name = 'openid_identifier',
90 value = ''
91 }
92 ui.submit{
93 text = _'OpenID Login'
94 }
95 end
96 }
97 end

Impressum / About Us