liquid_feedback_frontend

diff app/main/index/index.lua @ 369:5a0d5369b21d

Login at startpage when no public_access
author bsw
date Thu Mar 01 12:25:46 2012 +0100 (2012-03-01)
parents 9ac1ac69053d
children 9109900edad6
line diff
     1.1 --- a/app/main/index/index.lua	Thu Mar 01 12:22:41 2012 +0100
     1.2 +++ b/app/main/index/index.lua	Thu Mar 01 12:25:46 2012 +0100
     1.3 @@ -73,5 +73,41 @@
     1.4  
     1.5    ui.tag{ tag = "p", content = _"Closed user group, please login to participate." }
     1.6  
     1.7 +  ui.form{
     1.8 +  attr = { class = "login" },
     1.9 +  module = 'index',
    1.10 +  action = 'login',
    1.11 +  routing = {
    1.12 +    ok = {
    1.13 +      mode   = 'redirect',
    1.14 +      module = param.get("redirect_module") or "index",
    1.15 +      view = param.get("redirect_view") or "index",
    1.16 +      id = param.get("redirect_id"),
    1.17 +    },
    1.18 +    error = {
    1.19 +      mode   = 'forward',
    1.20 +      module = 'index',
    1.21 +      view   = 'login',
    1.22 +    }
    1.23 +  },
    1.24 +  content = function()
    1.25 +    ui.field.text{
    1.26 +      attr = { id = "username_field" },
    1.27 +      label     = _'login name',
    1.28 +      html_name = 'login',
    1.29 +      value     = ''
    1.30 +    }
    1.31 +    ui.script{ script = 'document.getElementById("username_field").focus();' }
    1.32 +    ui.field.password{
    1.33 +      label     = _'Password',
    1.34 +      html_name = 'password',
    1.35 +      value     = ''
    1.36 +    }
    1.37 +    ui.submit{
    1.38 +      text = _'Login'
    1.39 +    }
    1.40 +  end
    1.41 +}
    1.42 +
    1.43  end
    1.44  

Impressum / About Us