liquid_feedback_frontend

view app/main/index/login.lua @ 75:733f65c0c0a0

Bugfixes, feature enhancements, code-cleanup, and major work on API

Details:
- API
-- Allow relation name to be passed to helper function util.autoapi{...}
-- Added area API
-- Bugfixes in API
--- Correctly return initiatives (bug #162)
--- Correctly process "id" parameter for initiative API
--- Bugfix related to "state" parameter (bug #165)
--- Changed constant "discussion" to "accepted" (in model/issue.lua, used by API)
--- Fixed JSON encoding in auto_api (bug #181)
--- Ignore list filter "voted" in case of public access
--- Enable access to API without session
- Work on RSS feed (incomplete yet)
- Other bugfixes
-- Handle empty browser identification string
-- Handle invalid date in member/update.lua (bugs #24 #109 #115 #136)
-- Better handle errors while converting uploaded images. (bug #79 +5 duplicates)
-- Don't display revoked initiatives in list of new drafts (bug #134)
-- Fixed syntax error in app/main/member/_action/update_name.lua throwing unexpected error, when new name was too short
-- Do not display refresh support button for revoked initiatives
-- Repaired issue search (bug #150)
-- Fixed typos in german translation files
--- "initi(i)erte"
--- "Er(g)eignisse" (bug #161)
- Code cleanup
-- Removed deprecated motd files locale/motd/de.txt and locale/motd/de_public.txt
-- Removed redundant code in app/main/index/_updated_drafts.lua
- New features and (optical) enhancements
-- Support change of notify email; notification of not approved address added to start page
-- Settings dialog splitted into single pages
-- Mark deactivated members
-- Calendar for birthday selection in profile
-- Policy list public readable when public access is enabled
author bsw
date Thu Jul 08 18:44:02 2010 +0200 (2010-07-08)
parents c553898f64cb
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