annotate app/main/draft/new.lua @ 0:3bfb2fcf7ab9
Version alpha1
author |
bsw/jbe |
date |
Wed Nov 18 12:00:00 2009 +0100 (2009-11-18) |
parents |
|
children |
5c601807d397 |
rev |
line source |
bsw/jbe@0
|
1 slot.put_into("title", _"Add new draft")
|
bsw/jbe@0
|
2
|
bsw/jbe@0
|
3 local initiative_id = param.get("initiative_id")
|
bsw/jbe@0
|
4
|
bsw/jbe@0
|
5 ui.form{
|
bsw/jbe@0
|
6 attr = { class = "vertical" },
|
bsw/jbe@0
|
7 module = "draft",
|
bsw/jbe@0
|
8 action = "add",
|
bsw/jbe@0
|
9 params = { initiative_id = initiative_id },
|
bsw/jbe@0
|
10 routing = {
|
bsw/jbe@0
|
11 default = {
|
bsw/jbe@0
|
12 mode = "redirect",
|
bsw/jbe@0
|
13 module = "initiative",
|
bsw/jbe@0
|
14 view = "show",
|
bsw/jbe@0
|
15 id = initiative_id
|
bsw/jbe@0
|
16 }
|
bsw/jbe@0
|
17 },
|
bsw/jbe@0
|
18 content = function()
|
bsw/jbe@0
|
19
|
bsw/jbe@0
|
20 ui.field.text{ label = _"Author", value = app.session.member.name, readonly = true }
|
bsw/jbe@0
|
21 ui.field.text{ label = _"Content", name = "content", multiline = true }
|
bsw/jbe@0
|
22
|
bsw/jbe@0
|
23 ui.submit{ text = _"Save" }
|
bsw/jbe@0
|
24 end
|
bsw/jbe@0
|
25 }
|