liquid_feedback_frontend

annotate app/main/index/login.lua @ 65:d63d32c9fb37

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

Impressum / About Us