annotate app/main/admin/cancel_issue.lua @ 1026:8e2dd941d404
Fixed wrong form field name in admin cancel issue view
author |
bsw |
date |
Sun Aug 11 22:24:26 2013 +0200 (2013-08-11) |
parents |
6d93c6958f63 |
children |
701a5cf6b067 |
rev |
line source |
bsw@1007
|
1
|
bsw@1007
|
2 local id = param.get("id")
|
bsw@1007
|
3
|
bsw@1007
|
4 if not id then
|
bsw@1024
|
5 ui.title("Cancel issue")
|
bsw@1020
|
6 ui.actions()
|
bsw@1007
|
7 ui.form{
|
bsw@1007
|
8 module = "admin",
|
bsw@1009
|
9 view = "cancel_issue",
|
bsw@1007
|
10 content = function()
|
bsw@1008
|
11 ui.field.text{ label = _"Issue ID", name = "id" }
|
bsw@1007
|
12 ui.submit{ text = _"Cancel issue" }
|
bsw@1007
|
13 end
|
bsw@1007
|
14 }
|
bsw@1007
|
15 else
|
bsw@1021
|
16
|
bsw@1021
|
17 local issue = Issue:by_id(id)
|
bsw@1021
|
18
|
bsw@1022
|
19 ui.title(_("Cancel issue #{id}", { id = issue.id }))
|
bsw@1020
|
20 ui.actions()
|
bsw@1020
|
21
|
bsw@1007
|
22
|
bsw@1007
|
23 execute.view{ module = "initiative", view = "_list", params = {
|
bsw@1017
|
24 initiatives_selector = issue:get_reference_selector("initiatives")
|
bsw@1007
|
25 } }
|
bsw@1007
|
26
|
bsw@1007
|
27 ui.form{
|
bsw@1007
|
28 module = "admin",
|
bsw@1009
|
29 action = "cancel_issue",
|
bsw@1007
|
30 id = id,
|
bsw@1019
|
31 attr = { class = "vertical" },
|
bsw@1007
|
32 content = function()
|
bsw@1026
|
33 ui.field.text{ label = _"Public administrative notice:", name = "admin_notice", multiline = true }
|
bsw@1007
|
34 ui.submit{ text = _"Cancel issue now" }
|
bsw@1007
|
35 end
|
bsw@1007
|
36 }
|
bsw@1007
|
37
|
bsw@1007
|
38 end
|