liquid_feedback_frontend

view app/main/index/login.lua @ 44:b2af739019ba

Fixed two spelling issues in Esperanto translation.
author Dinu Gherman
date Mon Mar 08 22:58:57 2010 +0100 (2010-03-08)
parents 00d1004545f1
children 0849be391140
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)
47 local lang = locale.get("lang")
48 local basepath = request.get_app_basepath()
49 local file_name = basepath .. "/locale/motd/" .. lang .. "_public.txt"
50 local file = io.open(file_name)
51 if file ~= nil then
52 local help_text = file:read("*a")
53 if #help_text > 0 then
54 ui.container{
55 attr = { class = "motd wiki" },
56 content = function()
57 slot.put(format.wiki_text(help_text))
58 end
59 }
60 end
61 end
65 ui.tag{
66 tag = 'p',
67 content = _'You need to be logged in, to use this system.'
68 }
70 ui.form{
71 attr = { class = "login" },
72 module = 'index',
73 action = 'login',
74 routing = {
75 ok = {
76 mode = 'redirect',
77 module = 'index',
78 view = 'index'
79 },
80 error = {
81 mode = 'forward',
82 module = 'index',
83 view = 'login',
84 }
85 },
86 content = function()
87 ui.field.text{
88 attr = { id = "username_field" },
89 label = _'login name',
90 html_name = 'login',
91 value = ''
92 }
93 ui.script{ script = 'document.getElementById("username_field").focus();' }
94 ui.field.password{
95 label = _'Password',
96 html_name = 'password',
97 value = ''
98 }
99 ui.submit{
100 text = _'Login'
101 }
102 end
103 }

Impressum / About Us