webmcp
annotate demo-app/app/main/index/login.lua @ 11:d76a8857ba62
Added ui.partial and other functions, which allow partial content replacement using XMLHttpRequests; Image support for ui.link
Also includes following changes:
- Fix for rocketcgi library to accept POST data content-types, which contain additional charset information.
- Support arrays passed as params to encode.url (only for keys ending with "[]")
- Version information changed to "1.0.7"
Documentation for added functions is not yet complete.
Also includes following changes:
- Fix for rocketcgi library to accept POST data content-types, which contain additional charset information.
- Support arrays passed as params to encode.url (only for keys ending with "[]")
- Version information changed to "1.0.7"
Documentation for added functions is not yet complete.
| author | jbe/bsw |
|---|---|
| date | Fri Feb 12 18:40:22 2010 +0100 (2010-02-12) |
| parents | 9fdfb27f8e67 |
| children |
| rev | line source |
|---|---|
| jbe/bsw@0 | 1 slot.put_into("title", encode.html(_"Password login")) |
| jbe/bsw@0 | 2 |
| jbe/bsw@0 | 3 slot.select("main", function() |
| jbe/bsw@0 | 4 |
| jbe/bsw@0 | 5 ui.form{ |
| jbe/bsw@0 | 6 attr = { class = "vertical" }, |
| jbe/bsw@0 | 7 module = "index", |
| jbe/bsw@0 | 8 action = "login", |
| jbe/bsw@0 | 9 routing = { |
| jbe/bsw@0 | 10 default = { |
| jbe/bsw@0 | 11 mode = "redirect", |
| jbe/bsw@0 | 12 module = "index", |
| jbe/bsw@0 | 13 view = "index" |
| jbe/bsw@0 | 14 } |
| jbe/bsw@0 | 15 }, |
| jbe/bsw@0 | 16 content = function() |
| jbe/bsw@0 | 17 |
| jbe/bsw@0 | 18 ui.container{ |
| jbe/bsw@0 | 19 attr = { class = "lang_chooser" }, |
| jbe/bsw@0 | 20 content = function() |
| jbe/bsw@0 | 21 for i, lang in ipairs{"en", "de", "es"} do |
| jbe/bsw@0 | 22 ui.container{ |
| jbe/bsw@0 | 23 content = function() |
| jbe/bsw@0 | 24 ui.link{ |
| jbe/bsw@0 | 25 content = function() |
| jbe/bsw@0 | 26 ui.image{ |
| jbe/bsw@0 | 27 static = "lang/" .. lang .. ".png", |
| jbe/bsw@0 | 28 attr = { alt = lang } |
| jbe/bsw@0 | 29 } |
| jbe/bsw@0 | 30 slot.put(lang) |
| jbe/bsw@0 | 31 end, |
| jbe/bsw@0 | 32 module = "index", |
| jbe/bsw@0 | 33 view = "login", |
| jbe/bsw@0 | 34 params = { lang = lang } |
| jbe/bsw@0 | 35 } |
| jbe/bsw@0 | 36 end |
| jbe/bsw@0 | 37 } |
| jbe/bsw@0 | 38 end |
| jbe/bsw@0 | 39 end |
| jbe/bsw@0 | 40 } |
| jbe/bsw@0 | 41 |
| jbe/bsw@0 | 42 ui.field.text{ label = _"Username", name = "ident" } |
| jbe/bsw@0 | 43 ui.field.text{ label = _"Password", name = "password" } |
| jbe/bsw@0 | 44 ui.submit{ text = _"Login" } |
| jbe/bsw@0 | 45 end |
| jbe/bsw@0 | 46 } |
| jbe/bsw@0 | 47 end) |