liquid_feedback_frontend

annotate 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
rev   line source
jbe@231 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."
bsw/jbe@5 2
bsw/jbe@5 3 ui.script{ static = "js/browser_warning.js" }
bsw/jbe@5 4 ui.script{ script = "checkBrowser(" .. encode.json(_"Your web browser is not fully supported yet." .. " " .. warning_text:gsub("\n", "\n\n")) .. ");" }
bsw/jbe@5 5
bsw/jbe@5 6 ui.tag{
bsw/jbe@5 7 tag = "noscript",
bsw/jbe@5 8 content = function()
bsw/jbe@5 9 slot.put(_"JavaScript is disabled or not available." .. " " .. encode.html_newlines(warning_text))
bsw/jbe@5 10 end
bsw/jbe@5 11 }
bsw/jbe@5 12
bsw@441 13 execute.view{ module = "index", view = "_lang_chooser" }
bsw@441 14
bsw/jbe@0 15 slot.put_into("title", encode.html(config.app_title))
jorges@105 16 app.html_title.title = _"Login"
bsw/jbe@0 17
bsw@11 18
bsw@69 19 if config.motd_public then
bsw@69 20 local help_text = config.motd_public
bsw@69 21 ui.container{
bsw@69 22 attr = { class = "wiki motd" },
bsw@69 23 content = function()
bsw@69 24 slot.put(format.wiki_text(help_text))
bsw@69 25 end
bsw@69 26 }
bsw@69 27 end
bsw@11 28
bsw@369 29 if config.public_access then
bsw@369 30 ui.tag{
bsw@369 31 tag = 'p',
bsw@369 32 content = _'You need to be logged in, to use all features of this system.'
bsw@369 33 }
bsw@369 34 else
bsw@369 35 ui.tag{ tag = "p", content = _"Closed user group, please login to participate." }
bsw@369 36 end
bsw/jbe@0 37
bsw/jbe@0 38 ui.form{
bsw/jbe@0 39 attr = { class = "login" },
bsw/jbe@0 40 module = 'index',
bsw/jbe@0 41 action = 'login',
bsw/jbe@0 42 routing = {
bsw/jbe@0 43 ok = {
bsw/jbe@0 44 mode = 'redirect',
bsw@51 45 module = param.get("redirect_module") or "index",
bsw@51 46 view = param.get("redirect_view") or "index",
bsw@51 47 id = param.get("redirect_id"),
bsw/jbe@0 48 },
bsw/jbe@0 49 error = {
bsw/jbe@0 50 mode = 'forward',
bsw/jbe@0 51 module = 'index',
bsw/jbe@0 52 view = 'login',
bsw/jbe@0 53 }
bsw/jbe@0 54 },
bsw/jbe@0 55 content = function()
bsw/jbe@0 56 ui.field.text{
bsw/jbe@0 57 attr = { id = "username_field" },
bsw/jbe@5 58 label = _'login name',
bsw/jbe@0 59 html_name = 'login',
bsw/jbe@0 60 value = ''
bsw/jbe@0 61 }
bsw/jbe@0 62 ui.script{ script = 'document.getElementById("username_field").focus();' }
bsw/jbe@0 63 ui.field.password{
bsw/jbe@0 64 label = _'Password',
bsw/jbe@0 65 html_name = 'password',
bsw/jbe@0 66 value = ''
bsw/jbe@0 67 }
bsw/jbe@0 68 ui.submit{
bsw/jbe@0 69 text = _'Login'
bsw/jbe@0 70 }
bsw/jbe@0 71 end
bsw/jbe@0 72 }
bsw@11 73
bsw@51 74 if config.auth_openid_enabled then
bsw@51 75 ui.form{
bsw@51 76 attr = { class = "login" },
bsw@51 77 module = 'openid',
bsw@51 78 action = 'initiate',
bsw@51 79 routing = {
bsw@51 80 default = {
bsw@51 81 mode = 'forward',
bsw@51 82 module = 'index',
bsw@51 83 view = 'login',
bsw@51 84 }
bsw@51 85 },
bsw@51 86 content = function()
bsw@51 87 ui.field.text{
bsw@51 88 label = _'OpenID',
bsw@51 89 html_name = 'openid_identifier',
bsw@51 90 value = ''
bsw@51 91 }
bsw@51 92 ui.submit{
bsw@51 93 text = _'OpenID Login'
bsw@51 94 }
bsw@51 95 end
bsw@51 96 }
bsw@51 97 end

Impressum / About Us