liquid_feedback_frontend
view app/main/member/settings_notification.lua @ 560:0fce0bdf7ce1
Removed comment with example code and made text more clear
author | bsw |
---|---|
date | Tue Jun 19 21:28:33 2012 +0200 (2012-06-19) |
parents | 4e5bb26f0335 |
children | 418b590fa9ed |
line source
1 slot.put_into("title", _"Notification settings")
3 slot.select("actions", function()
4 ui.link{
5 content = function()
6 ui.image{ static = "icons/16/cancel.png" }
7 slot.put(_"Cancel")
8 end,
9 module = "member",
10 view = "settings"
11 }
12 end)
15 util.help("member.settings.notification", _"Notification settings")
17 ui.form{
18 attr = { class = "vertical" },
19 module = "member",
20 action = "update_notify_level",
21 routing = {
22 ok = {
23 mode = "redirect",
24 module = "index",
25 view = "index"
26 }
27 },
28 content = function()
29 ui.tag{ tag = "p", content = _"I like to receive notifications by email about events in my areas and issues:" }
31 ui.container{ content = function()
32 ui.tag{
33 tag = "input",
34 attr = {
35 id = "notify_level_none",
36 type = "radio", name = "notify_level", value = "none",
37 checked = app.session.member.notify_level == 'none' and "checked" or nil
38 }
39 }
40 ui.tag{
41 tag = "label", attr = { ['for'] = "notify_level_none" },
42 content = _"No notifications at all"
43 }
44 end }
46 slot.put("<br />")
48 ui.container{ content = function()
49 ui.tag{
50 tag = "input",
51 attr = {
52 id = "notify_level_all",
53 type = "radio", name = "notify_level", value = "all",
54 checked = app.session.member.notify_level == 'all' and "checked" or nil
55 }
56 }
57 ui.tag{
58 tag = "label", attr = { ['for'] = "notify_level_all" },
59 content = _"All of them"
60 }
61 end }
63 slot.put("<br />")
65 ui.container{ content = function()
66 ui.tag{
67 tag = "input",
68 attr = {
69 id = "notify_level_discussion",
70 type = "radio", name = "notify_level", value = "discussion",
71 checked = app.session.member.notify_level == 'discussion' and "checked" or nil
72 }
73 }
74 ui.tag{
75 tag = "label", attr = { ['for'] = "notify_level_discussion" },
76 content = _"Only for issues reaching the discussion phase"
77 }
78 end }
80 slot.put("<br />")
82 ui.container{ content = function()
83 ui.tag{
84 tag = "input",
85 attr = {
86 id = "notify_level_verification",
87 type = "radio", name = "notify_level", value = "verification",
88 checked = app.session.member.notify_level == 'verification' and "checked" or nil
89 }
90 }
91 ui.tag{
92 tag = "label", attr = { ['for'] = "notify_level_verification" },
93 content = _"Only for issues reaching the frozen phase"
94 }
95 end }
97 slot.put("<br />")
99 ui.container{ content = function()
100 ui.tag{
101 tag = "input",
102 attr = {
103 id = "notify_level_voting",
104 type = "radio", name = "notify_level", value = "voting",
105 checked = app.session.member.notify_level == 'voting' and "checked" or nil
106 }
107 }
108 ui.tag{
109 tag = "label", attr = { ['for'] = "notify_level_voting" },
110 content = _"Only for issues reaching the voting phase"
111 }
112 end }
114 slot.put("<br />")
116 ui.submit{ value = _"Change notification settings" }
117 end
118 }