liquid_feedback_frontend

view app/main/member/settings_notification.lua @ 1126:7b46738a9261

Added missing translation function calls to member notification settings view
author bsw
date Wed Dec 24 12:12:01 2014 +0100 (2014-12-24)
parents 701a5cf6b067
children c0fd12b97d65
line source
1 local return_to = param.get("return_to")
3 ui.titleMember(_"notification settings")
5 execute.view {
6 module = "member", view = "_sidebar_whatcanido", params = {
7 member = app.session.member
8 }
9 }
11 ui.form{
12 attr = { class = "vertical" },
13 module = "member",
14 action = "update_notify_level",
15 routing = {
16 ok = {
17 mode = "redirect",
18 module = return_to == "home" and "index" or "member",
19 view = return_to == "home" and "index" or "show",
20 id = return_to ~= "home" and app.session.member_id or nil
21 }
22 },
23 content = function()
25 ui.section( function()
27 ui.sectionHead( function()
28 ui.heading { level = 1, content = _"For which issue phases do you like to receive notification emails?" }
29 end )
32 ui.sectionRow( function()
34 ui.container{ content = function()
35 ui.tag{
36 tag = "input",
37 attr = {
38 id = "notify_level_all",
39 type = "radio", name = "notify_level", value = "all",
40 checked = app.session.member.notify_level == 'all' and "checked" or nil
41 }
42 }
43 ui.tag{
44 tag = "label", attr = { ['for'] = "notify_level_all" },
45 content = _"I like to receive notifications"
46 }
47 end }
49 slot.put("<br />")
51 ui.container{ content = function()
52 ui.tag{
53 tag = "input",
54 attr = {
55 id = "notify_level_discussion",
56 type = "radio", name = "notify_level", value = "discussion",
57 checked = app.session.member.notify_level == 'discussion' and "checked" or nil
58 }
59 }
60 ui.tag{
61 tag = "label", attr = { ['for'] = "notify_level_discussion" },
62 content = _"Only for issues reaching the discussion phase"
63 }
64 end }
66 slot.put("<br />")
68 ui.container{ content = function()
69 ui.tag{
70 tag = "input",
71 attr = {
72 id = "notify_level_verification",
73 type = "radio", name = "notify_level", value = "verification",
74 checked = app.session.member.notify_level == 'verification' and "checked" or nil
75 }
76 }
77 ui.tag{
78 tag = "label", attr = { ['for'] = "notify_level_verification" },
79 content = _"Only for issues reaching the verification phase"
80 }
81 end }
83 slot.put("<br />")
85 ui.container{ content = function()
86 ui.tag{
87 tag = "input",
88 attr = {
89 id = "notify_level_voting",
90 type = "radio", name = "notify_level", value = "voting",
91 checked = app.session.member.notify_level == 'voting' and "checked" or nil
92 }
93 }
94 ui.tag{
95 tag = "label", attr = { ['for'] = "notify_level_voting" },
96 content = _"Only for issues reaching the voting phase"
97 }
98 end }
100 slot.put("<br />")
102 ui.container{ content = function()
103 ui.tag{
104 tag = "input",
105 attr = {
106 id = "notify_level_none",
107 type = "radio", name = "notify_level", value = "none",
108 checked = app.session.member.notify_level == 'none' and "checked" or nil
109 }
110 }
111 ui.tag{
112 tag = "label", attr = { ['for'] = "notify_level_none" },
113 content = _"I do not like to receive notifications by email"
114 }
115 end }
117 slot.put("<br />")
119 ui.container { content = _"Notifications are only send to you about events in the subject areas you subscribed, the issues you are interested in and the initiatives you are supporting." }
122 slot.put("<br />")
124 ui.tag{
125 tag = "input",
126 attr = {
127 type = "submit",
128 class = "btn btn-default",
129 value = _"Save"
130 },
131 content = ""
132 }
133 slot.put("<br /><br /><br />")
135 slot.put(" ")
136 if return_to == "home" then
137 ui.link {
138 module = "index", view = "index",
139 content = _"cancel"
140 }
141 else
142 ui.link {
143 module = "member", view = "show", id = app.session.member_id,
144 content = _"cancel"
145 }
146 end
147 end )
148 end )
150 end
151 }

Impressum / About Us