liquid_feedback_frontend

view app/main/member/settings_notification.lua @ 1248:c0fd12b97d65

Changes on notifications system, newsletter support added
author bsw
date Tue Apr 05 20:40:37 2016 +0200 (2016-04-05)
parents 7b46738a9261
children 84f6e17c7ceb
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 = "disable_notifications", value = "false",
40 checked = not app.session.member.disable_notifications 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_none",
56 type = "radio", name = "disable_notifications", value = "true",
57 checked = app.session.member.disable_notifications and "checked" or nil
58 }
59 }
60 ui.tag{
61 tag = "label", attr = { ['for'] = "notify_level_none" },
62 content = _"I do not like to receive notifications by email"
63 }
64 end }
66 slot.put("<br />")
68 ui.tag{
69 tag = "input",
70 attr = {
71 type = "submit",
72 class = "btn btn-default",
73 value = _"Save"
74 },
75 content = ""
76 }
77 slot.put("<br /><br /><br />")
79 slot.put(" ")
80 if return_to == "home" then
81 ui.link {
82 module = "index", view = "index",
83 content = _"cancel"
84 }
85 else
86 ui.link {
87 module = "member", view = "show", id = app.session.member_id,
88 content = _"cancel"
89 }
90 end
91 end )
92 end )
94 end
95 }

Impressum / About Us