bsw/jbe@0: slot.put_into("title", _"Add new draft") bsw/jbe@0: bsw@2: local initiative = Initiative:by_id(param.get("initiative_id")) bsw/jbe@0: bsw/jbe@0: ui.form{ bsw@2: record = initiative.current_draft, bsw/jbe@0: attr = { class = "vertical" }, bsw/jbe@0: module = "draft", bsw/jbe@0: action = "add", bsw@2: params = { initiative_id = initiative.id }, bsw/jbe@0: routing = { bsw/jbe@0: default = { bsw/jbe@0: mode = "redirect", bsw/jbe@0: module = "initiative", bsw/jbe@0: view = "show", bsw@2: id = initiative.id bsw/jbe@0: } bsw/jbe@0: }, bsw/jbe@0: content = function() bsw/jbe@0: bsw/jbe@0: ui.field.text{ label = _"Author", value = app.session.member.name, readonly = true } bsw@2: ui.field.text{ bsw@2: label = _"Content", bsw@2: name = "content", bsw@2: multiline = true, bsw@2: attr = { style = "height: 50ex;" } bsw@2: } bsw/jbe@0: bsw/jbe@0: ui.submit{ text = _"Save" } bsw/jbe@0: end bsw/jbe@0: }