liquid_feedback_frontend

annotate app/main/index/login.lua @ 231:068ad175ebd7

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

Impressum / About Us