bsw@1007: bsw@1007: local id = param.get("id") bsw@1007: bsw@1007: if not id then bsw@1024: ui.title("Cancel issue") bsw@1020: ui.actions() bsw@1007: ui.form{ bsw@1007: module = "admin", bsw@1009: view = "cancel_issue", bsw@1007: content = function() bsw@1008: ui.field.text{ label = _"Issue ID", name = "id" } bsw@1007: ui.submit{ text = _"Cancel issue" } bsw@1007: end bsw@1007: } bsw@1007: else bsw@1021: bsw@1021: local issue = Issue:by_id(id) bsw@1021: bsw@1022: ui.title(_("Cancel issue #{id}", { id = issue.id })) bsw@1020: ui.actions() bsw@1020: bsw@1007: bsw@1007: execute.view{ module = "initiative", view = "_list", params = { bsw@1017: initiatives_selector = issue:get_reference_selector("initiatives") bsw@1007: } } bsw@1007: bsw@1007: ui.form{ bsw@1007: module = "admin", bsw@1009: action = "cancel_issue", bsw@1007: id = id, bsw@1019: attr = { class = "vertical" }, bsw@1007: content = function() bsw@1026: ui.field.text{ label = _"Public administrative notice:", name = "admin_notice", multiline = true } bsw@1007: ui.submit{ text = _"Cancel issue now" } bsw@1007: end bsw@1007: } bsw@1007: bsw@1007: end