liquid_feedback_frontend

annotate app/main/index/login.lua @ 69:c553898f64cb

Moved motd from locale/motd/*-files to configuration setting
author bsw
date Fri Apr 23 14:13:08 2010 +0200 (2010-04-23)
parents 0849be391140
children 07953b0ef62c
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@69 46 if config.motd_public then
bsw@69 47 local help_text = config.motd_public
bsw@69 48 ui.container{
bsw@69 49 attr = { class = "wiki motd" },
bsw@69 50 content = function()
bsw@69 51 slot.put(format.wiki_text(help_text))
bsw@69 52 end
bsw@69 53 }
bsw@69 54 end
bsw@11 55
bsw/jbe@0 56 ui.tag{
bsw/jbe@0 57 tag = 'p',
bsw@51 58 content = _'You need to be logged in, to use all features of this system.'
bsw/jbe@0 59 }
bsw/jbe@0 60
bsw/jbe@0 61 ui.form{
bsw/jbe@0 62 attr = { class = "login" },
bsw/jbe@0 63 module = 'index',
bsw/jbe@0 64 action = 'login',
bsw/jbe@0 65 routing = {
bsw/jbe@0 66 ok = {
bsw/jbe@0 67 mode = 'redirect',
bsw@51 68 module = param.get("redirect_module") or "index",
bsw@51 69 view = param.get("redirect_view") or "index",
bsw@51 70 id = param.get("redirect_id"),
bsw/jbe@0 71 },
bsw/jbe@0 72 error = {
bsw/jbe@0 73 mode = 'forward',
bsw/jbe@0 74 module = 'index',
bsw/jbe@0 75 view = 'login',
bsw/jbe@0 76 }
bsw/jbe@0 77 },
bsw/jbe@0 78 content = function()
bsw/jbe@0 79 ui.field.text{
bsw/jbe@0 80 attr = { id = "username_field" },
bsw/jbe@5 81 label = _'login name',
bsw/jbe@0 82 html_name = 'login',
bsw/jbe@0 83 value = ''
bsw/jbe@0 84 }
bsw/jbe@0 85 ui.script{ script = 'document.getElementById("username_field").focus();' }
bsw/jbe@0 86 ui.field.password{
bsw/jbe@0 87 label = _'Password',
bsw/jbe@0 88 html_name = 'password',
bsw/jbe@0 89 value = ''
bsw/jbe@0 90 }
bsw/jbe@0 91 ui.submit{
bsw/jbe@0 92 text = _'Login'
bsw/jbe@0 93 }
bsw/jbe@0 94 end
bsw/jbe@0 95 }
bsw@11 96
bsw@51 97 if config.auth_openid_enabled then
bsw@51 98 ui.form{
bsw@51 99 attr = { class = "login" },
bsw@51 100 module = 'openid',
bsw@51 101 action = 'initiate',
bsw@51 102 routing = {
bsw@51 103 default = {
bsw@51 104 mode = 'forward',
bsw@51 105 module = 'index',
bsw@51 106 view = 'login',
bsw@51 107 }
bsw@51 108 },
bsw@51 109 content = function()
bsw@51 110 ui.field.text{
bsw@51 111 label = _'OpenID',
bsw@51 112 html_name = 'openid_identifier',
bsw@51 113 value = ''
bsw@51 114 }
bsw@51 115 ui.submit{
bsw@51 116 text = _'OpenID Login'
bsw@51 117 }
bsw@51 118 end
bsw@51 119 }
bsw@51 120 end

Impressum / About Us