liquid_feedback_frontend

view app/main/member/settings.lua @ 60:7bc629bc1c20

Optionally show configuration specific head over issues in public access mode
author bsw
date Thu Apr 22 16:00:49 2010 +0200 (2010-04-22)
parents 0849be391140
children 733f65c0c0a0
line source
2 slot.put_into("title", _"Settings")
4 slot.select("actions", function()
5 ui.link{
6 content = function()
7 ui.image{ static = "icons/16/cancel.png" }
8 slot.put(_"Cancel")
9 end,
10 module = "index",
11 view = "index"
12 }
14 ui.link{
15 content = function()
16 ui.image{ static = "icons/16/wrench.png" }
17 slot.put(_"Developer features")
18 end,
19 module = "member",
20 view = "developer_settings"
21 }
23 end)
25 ui.heading{ content = _"Display settings" }
26 util.help("member.settings.display", _"Display settings")
28 ui.form{
29 attr = { class = "vertical" },
30 module = "member",
31 action = "update_display",
32 routing = {
33 ok = {
34 mode = "redirect",
35 module = "index",
36 view = "index"
37 }
38 },
39 content = function()
40 ui.field.select{
41 label = _"Type of tabs",
42 foreign_records = {
43 { id = "tabs", name = _"Tabs" },
44 { id = "accordeon", name = _"Accordion (none expanded)" .. " === " .. _"EXPERIMENTAL FEATURE" .. " ===" },
45 { id = "accordeon_first_expanded", name = _"Accordion (first expanded)" .. " === " .. _"EXPERIMENTAL FEATURE" .. " ===" },
46 -- { id = "accordeon_all_expanded", name = _"Accordion (all expanded)" }
47 },
48 foreign_id = "id",
49 foreign_name = "name",
50 name = "tab_mode",
51 value = app.session.member:get_setting_value("tab_mode")
52 }
53 ui.field.select{
54 label = _"Number of initiatives to preview",
55 foreign_records = {
56 { id = 3, name = "3" },
57 { id = 4, name = "4" },
58 { id = 5, name = "5" },
59 { id = 6, name = "6" },
60 { id = 7, name = "7" },
61 { id = 8, name = "8" },
62 { id = 9, name = "9" },
63 { id = 10, name = "10" },
64 },
65 foreign_id = "id",
66 foreign_name = "name",
67 name = "initiatives_preview_limit",
68 value = app.session.member:get_setting_value("initiatives_preview_limit")
69 }
70 ui.submit{ value = _"Change display settings" }
71 end
72 }
74 ui.heading{ content = _"Change your name" }
75 util.help("member.settings.name", _"Change name")
77 ui.form{
78 attr = { class = "vertical" },
79 module = "member",
80 action = "update_name",
81 routing = {
82 ok = {
83 mode = "redirect",
84 module = "index",
85 view = "index"
86 }
87 },
88 content = function()
89 ui.field.text{ label = _"Name", name = "name", value = app.session.member.name }
90 ui.submit{ value = _"Change name" }
91 end
92 }
94 ui.heading{ content = _"Change your login" }
95 util.help("member.settings.login", _"Change login")
97 ui.form{
98 attr = { class = "vertical" },
99 module = "member",
100 action = "update_login",
101 routing = {
102 ok = {
103 mode = "redirect",
104 module = "index",
105 view = "index"
106 }
107 },
108 content = function()
109 ui.field.text{ label = _"Login", name = "login", value = app.session.member.login }
110 ui.submit{ value = _"Change login" }
111 end
112 }
114 ui.heading{ content = _"Change your password" }
115 util.help("member.settings.password", _"Change password")
117 ui.form{
118 attr = { class = "vertical" },
119 module = "member",
120 action = "update_password",
121 routing = {
122 ok = {
123 mode = "redirect",
124 module = "index",
125 view = "index"
126 }
127 },
128 content = function()
129 ui.field.password{ label = _"Old password", name = "old_password" }
130 ui.field.password{ label = _"New password", name = "new_password1" }
131 ui.field.password{ label = _"Repeat new password", name = "new_password2" }
132 ui.submit{ value = _"Change password" }
133 end

Impressum / About Us