annotate app/main/admin/cancel_issue.lua @ 1008:841d7f79f67d
Fixed wrong usage of ui field helper
author |
bsw |
date |
Sun Aug 11 22:03:34 2013 +0200 (2013-08-11) |
parents |
c547d1cce741 |
children |
5496a25105ae |
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@1007
|
10 view = "issue_delete",
|
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@1007
|
18 local issue = Issue.by_id(id)
|
bsw@1007
|
19 issue:load("initiatives")
|
bsw@1007
|
20
|
bsw@1007
|
21 execute.view{ module = "initiative", view = "_list", params = {
|
bsw@1007
|
22 issue = issue, initiatives = issue.initiatives
|
bsw@1007
|
23 } }
|
bsw@1007
|
24
|
bsw@1007
|
25 ui.form{
|
bsw@1007
|
26 module = "admin",
|
bsw@1007
|
27 view = "issue_delete",
|
bsw@1007
|
28 id = id,
|
bsw@1007
|
29 content = function()
|
bsw@1008
|
30 ui.field.text{ label = _"Administraive notice", name = "id" }
|
bsw@1007
|
31 ui.submit{ text = _"Cancel issue now" }
|
bsw@1007
|
32 end
|
bsw@1007
|
33 }
|
bsw@1007
|
34
|
bsw@1007
|
35 end
|