liquid_feedback_frontend

view app/main/index/login.lua @ 69:c553898f64cb

Moved motd from locale/motd/*-files to configuration setting
author bsw
date Fri Apr 23 14:13:08 2010 +0200 (2010-04-23)
parents 0849be391140
children 07953b0ef62c
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, 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 slot.put_into("title", encode.html(config.app_title))
15 slot.select("title", function()
16 ui.container{
17 attr = { class = "lang_chooser" },
18 content = function()
19 for i, lang in ipairs{"en", "de", "eo"} do
20 ui.link{
21 content = function()
22 ui.image{
23 static = "lang/" .. lang .. ".png",
24 attr = { style = "margin-left: 0.5em;", alt = lang }
25 }
26 end,
27 text = _('Select language "#{langcode}"', { langcode = lang }),
28 module = "index",
29 action = "set_lang",
30 params = { lang = lang },
31 routing = {
32 default = {
33 mode = "redirect",
34 module = request.get_module(),
35 view = request.get_view(),
36 id = param.get_id_cgi(),
37 params = param.get_all_cgi()
38 }
39 }
40 }
41 end
42 end
43 }
44 end)
46 if config.motd_public then
47 local help_text = config.motd_public
48 ui.container{
49 attr = { class = "wiki motd" },
50 content = function()
51 slot.put(format.wiki_text(help_text))
52 end
53 }
54 end
56 ui.tag{
57 tag = 'p',
58 content = _'You need to be logged in, to use all features of this system.'
59 }
61 ui.form{
62 attr = { class = "login" },
63 module = 'index',
64 action = 'login',
65 routing = {
66 ok = {
67 mode = 'redirect',
68 module = param.get("redirect_module") or "index",
69 view = param.get("redirect_view") or "index",
70 id = param.get("redirect_id"),
71 },
72 error = {
73 mode = 'forward',
74 module = 'index',
75 view = 'login',
76 }
77 },
78 content = function()
79 ui.field.text{
80 attr = { id = "username_field" },
81 label = _'login name',
82 html_name = 'login',
83 value = ''
84 }
85 ui.script{ script = 'document.getElementById("username_field").focus();' }
86 ui.field.password{
87 label = _'Password',
88 html_name = 'password',
89 value = ''
90 }
91 ui.submit{
92 text = _'Login'
93 }
94 end
95 }
97 if config.auth_openid_enabled then
98 ui.form{
99 attr = { class = "login" },
100 module = 'openid',
101 action = 'initiate',
102 routing = {
103 default = {
104 mode = 'forward',
105 module = 'index',
106 view = 'login',
107 }
108 },
109 content = function()
110 ui.field.text{
111 label = _'OpenID',
112 html_name = 'openid_identifier',
113 value = ''
114 }
115 ui.submit{
116 text = _'OpenID Login'
117 }
118 end
119 }
120 end

Impressum / About Us