liquid_feedback_frontend

view app/main/membership/_show_box.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.
author bsw
date Mon Jan 04 12:00:00 2010 +0100 (2010-01-04)
parents 80c215dbf076
children 00d1004545f1
line source
1 local area = param.get("area", "table")
3 local membership = Membership:by_pk(area.id, app.session.member.id)
5 slot.select("interest", function()
7 if membership then
9 ui.container{
10 attr = {
11 class = "head head_active",
12 onclick = "document.getElementById('membership_content').style.display = 'block';"
13 },
14 content = function()
15 ui.image{
16 static = "icons/16/user_green.png"
17 }
18 slot.put(_"You are member")
19 ui.image{
20 static = "icons/16/dropdown.png"
21 }
22 end
23 }
25 ui.container{
26 attr = { class = "content", id = "membership_content" },
27 content = function()
28 ui.container{
29 attr = {
30 class = "close",
31 style = "cursor: pointer;",
32 onclick = "document.getElementById('membership_content').style.display = 'none';"
33 },
34 content = function()
35 ui.image{ static = "icons/16/cross.png" }
36 end
37 }
38 ui.link{
39 content = _"Remove my membership",
40 module = "membership",
41 action = "update",
42 params = { area_id = area.id, delete = true },
43 routing = { default = { mode = "redirect", module = "area", view = "show", id = area.id } }
44 }
45 if membership.autoreject then
46 ui.field.text{ value = _"Autoreject is on." }
47 ui.link{
48 content = _"Remove autoreject",
49 module = "membership",
50 action = "update",
51 params = { area_id = area.id, autoreject = false },
52 routing = { default = { mode = "redirect", module = "area", view = "show", id = area.id } }
53 }
54 else
55 ui.field.text{ value = _"Autoreject is off." }
56 ui.link{
57 content = _"Set autoreject",
58 module = "membership",
59 action = "update",
60 params = { area_id = area.id, autoreject = true },
61 routing = { default = { mode = "redirect", module = "area", view = "show", id = area.id } }
62 }
63 end
64 end
65 }
66 else
67 ui.link{
68 content = function()
69 ui.image{ static = "icons/16/user_add.png" }
70 slot.put(_"Become a member")
71 end,
72 module = "membership",
73 action = "update",
74 params = { area_id = area.id },
75 routing = {
76 default = {
77 mode = "redirect",
78 module = "area",
79 view = "show",
80 id = area.id
81 }
82 }
83 }
84 end
86 end)

Impressum / About Us