bsw@3: local initiative = Initiative:by_id(param.get_id()) bsw@3: bsw@3: slot.put_into("title", _"Edit initiative") bsw@3: bsw/jbe@4: slot.select("actions", function() bsw/jbe@4: ui.link{ bsw/jbe@4: content = function() bsw/jbe@4: ui.image{ static = "icons/16/cancel.png" } bsw/jbe@4: slot.put(_"Cancel") bsw/jbe@4: end, bsw/jbe@4: module = "initiative", bsw/jbe@4: view = "show", bsw/jbe@4: id = initiative.id bsw/jbe@4: } bsw/jbe@4: end) bsw/jbe@4: bsw@3: ui.form{ bsw@3: record = initiative, bsw@3: module = "initiative", bsw@3: action = "update", bsw@3: id = initiative.id, bsw@3: attr = { class = "vertical" }, bsw@3: routing = { bsw@3: default = { bsw@3: mode = "redirect", bsw@3: module = "initiative", bsw@3: view = "show", bsw@3: id = initiative.id bsw@3: } bsw@3: }, bsw@3: content = function() bsw@3: ui.field.text{ label = _"Discussion URL", name = "discussion_url" } bsw@3: ui.submit{ text = _"Save" } bsw@3: end bsw@3: }