liquid_feedback_frontend
view app/main/initiative/new.lua @ 9:0ee1e0c42d4c
Version beta5
Minor security fix: Added missing security filter for admin section. Reading of member listing including login names was possible for all users. Write access has not been possible though.
Changing of name and login is possible while a history of these changes is written and accessible by all users.
Statistics shown in area list
Trimming of user input also converts multiple whitespaces to single space character.
Minor security fix: Added missing security filter for admin section. Reading of member listing including login names was possible for all users. Write access has not been possible though.
Changing of name and login is possible while a history of these changes is written and accessible by all users.
Statistics shown in area list
Trimming of user input also converts multiple whitespaces to single space character.
author | bsw |
---|---|
date | Mon Jan 04 12:00:00 2010 +0100 (2010-01-04) |
parents | 3941792e8be6 |
children | 72c5e0ee7c98 |
line source
1 local issue
2 local area
4 local issue_id = param.get("issue_id", atom.integer)
5 if issue_id then
6 issue = Issue:new_selector():add_where{"id=?",issue_id}:single_object_mode():exec()
7 area = issue.area
9 else
10 local area_id = param.get("area_id", atom.integer)
11 area = Area:new_selector():add_where{"id=?",area_id}:single_object_mode():exec()
12 end
14 if issue_id then
15 slot.put_into("title", _"Add new initiative to issue")
16 else
17 slot.put_into("title", _"Create new issue")
18 end
20 ui.form{
21 module = "initiative",
22 action = "create",
23 params = {
24 area_id = area.id,
25 issue_id = issue and issue.id or nil
26 },
27 attr = { class = "vertical" },
28 content = function()
29 ui.field.text{ label = _"Area", value = area.name }
30 if issue_id then
31 ui.field.text{ label = _"Issue", value = issue_id }
32 else
33 local value
34 ui.field.select{
35 label = _"Policy",
36 name = "policy_id",
37 foreign_records = area.allowed_policies,
38 foreign_id = "id",
39 foreign_name = "name",
40 value = area.default_policy.id
41 }
42 end
43 ui.field.text{ label = _"Name", name = "name" }
44 ui.field.text{ label = _"Discussion URL", name = "discussion_url" }
45 ui.field.select{
46 label = _"Wiki engine",
47 name = "formatting_engine",
48 foreign_records = {
49 { id = "rocketwiki", name = "RocketWiki" },
50 { id = "compat", name = _"Traditional wiki syntax" }
51 },
52 foreign_id = "id",
53 foreign_name = "name"
54 }
55 ui.field.text{ label = _"Draft", name = "draft", multiline = true, attr = { style = "height: 50ex;" } }
56 ui.submit{ text = _"Save" }
57 end
58 }