liquid_feedback_frontend
annotate app/main/admin/cancel_issue.lua @ 1017:279872d1c6bc
Corrected wrong usage of initiative list partial view in admin cancel issue
author | bsw |
---|---|
date | Sun Aug 11 22:10:25 2013 +0200 (2013-08-11) |
parents | aab9dc793570 |
children | 7ab637445ffc |
rev | line source |
---|---|
bsw@1007 | 1 ui.title(_"Cancel issue") |
bsw@1007 | 2 |
bsw@1007 | 3 ui.actions() |
bsw@1007 | 4 |
bsw@1007 | 5 local id = param.get("id") |
bsw@1007 | 6 |
bsw@1007 | 7 if not id then |
bsw@1007 | 8 ui.form{ |
bsw@1007 | 9 module = "admin", |
bsw@1009 | 10 view = "cancel_issue", |
bsw@1007 | 11 content = function() |
bsw@1008 | 12 ui.field.text{ label = _"Issue ID", name = "id" } |
bsw@1007 | 13 ui.submit{ text = _"Cancel issue" } |
bsw@1007 | 14 end |
bsw@1007 | 15 } |
bsw@1007 | 16 else |
bsw@1007 | 17 |
bsw@1010 | 18 local issue = Issue:by_id(id) |
bsw@1007 | 19 |
bsw@1007 | 20 execute.view{ module = "initiative", view = "_list", params = { |
bsw@1017 | 21 initiatives_selector = issue:get_reference_selector("initiatives") |
bsw@1007 | 22 } } |
bsw@1007 | 23 |
bsw@1007 | 24 ui.form{ |
bsw@1007 | 25 module = "admin", |
bsw@1009 | 26 action = "cancel_issue", |
bsw@1007 | 27 id = id, |
bsw@1007 | 28 content = function() |
bsw@1012 | 29 ui.field.text{ label = _"Administrative notice", name = "id" } |
bsw@1007 | 30 ui.submit{ text = _"Cancel issue now" } |
bsw@1007 | 31 end |
bsw@1007 | 32 } |
bsw@1007 | 33 |
bsw@1007 | 34 end |