liquid_feedback_frontend
view app/main/index/login.lua @ 520:f9b80c930456
Removed browser warning from login page
| author | bsw |
|---|---|
| date | Mon Apr 16 23:28:58 2012 +0200 (2012-04-16) |
| parents | 58647c8a0339 |
| children | f52f918b38b8 |
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 slot.put_into("title", encode.html(config.app_title))
11 app.html_title.title = _"Login"
14 if config.motd_public then
15 local help_text = config.motd_public
16 ui.container{
17 attr = { class = "wiki motd" },
18 content = function()
19 slot.put(format.wiki_text(help_text))
20 end
21 }
22 end
24 if config.public_access then
25 ui.tag{
26 tag = 'p',
27 content = _'You need to be logged in, to use all features of this system.'
28 }
29 else
30 ui.tag{ tag = "p", content = _"Closed user group, please login to participate." }
31 end
33 ui.form{
34 attr = { class = "login" },
35 module = 'index',
36 action = 'login',
37 routing = {
38 ok = {
39 mode = 'redirect',
40 module = param.get("redirect_module") or "index",
41 view = param.get("redirect_view") or "index",
42 id = param.get("redirect_id"),
43 },
44 error = {
45 mode = 'forward',
46 module = 'index',
47 view = 'login',
48 }
49 },
50 content = function()
51 ui.field.text{
52 attr = { id = "username_field" },
53 label = _'login name',
54 html_name = 'login',
55 value = ''
56 }
57 ui.script{ script = 'document.getElementById("username_field").focus();' }
58 ui.field.password{
59 label = _'Password',
60 html_name = 'password',
61 value = ''
62 }
63 ui.submit{
64 text = _'Login'
65 }
66 end
67 }
69 if config.auth_openid_enabled then
70 ui.form{
71 attr = { class = "login" },
72 module = 'openid',
73 action = 'initiate',
74 routing = {
75 default = {
76 mode = 'forward',
77 module = 'index',
78 view = 'login',
79 }
80 },
81 content = function()
82 ui.field.text{
83 label = _'OpenID',
84 html_name = 'openid_identifier',
85 value = ''
86 }
87 ui.submit{
88 text = _'OpenID Login'
89 }
90 end
91 }
92 end
