liquid_feedback_frontend
diff app/main/index/login.lua @ 0:3bfb2fcf7ab9
Version alpha1
| author | bsw/jbe |
|---|---|
| date | Wed Nov 18 12:00:00 2009 +0100 (2009-11-18) |
| parents | |
| children | 768faea1096d |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/app/main/index/login.lua Wed Nov 18 12:00:00 2009 +0100 1.3 @@ -0,0 +1,41 @@ 1.4 +slot.put_into("title", encode.html(config.app_title)) 1.5 + 1.6 +ui.tag{ 1.7 + tag = 'p', 1.8 + content = 'You need to be logged in, to use this system.' 1.9 +} 1.10 + 1.11 +ui.form{ 1.12 + attr = { class = "login" }, 1.13 + module = 'index', 1.14 + action = 'login', 1.15 + routing = { 1.16 + ok = { 1.17 + mode = 'redirect', 1.18 + module = 'index', 1.19 + view = 'index' 1.20 + }, 1.21 + error = { 1.22 + mode = 'forward', 1.23 + module = 'index', 1.24 + view = 'login', 1.25 + } 1.26 + }, 1.27 + content = function() 1.28 + ui.field.text{ 1.29 + attr = { id = "username_field" }, 1.30 + label = _'Username', 1.31 + html_name = 'login', 1.32 + value = '' 1.33 + } 1.34 + ui.script{ script = 'document.getElementById("username_field").focus();' } 1.35 + ui.field.password{ 1.36 + label = _'Password', 1.37 + html_name = 'password', 1.38 + value = '' 1.39 + } 1.40 + ui.submit{ 1.41 + text = _'Login' 1.42 + } 1.43 + end 1.44 +}