rev |
line source |
bsw@9
|
1
|
bsw@9
|
2 slot.put_into("title", _"Settings")
|
bsw@9
|
3
|
bsw@9
|
4 slot.select("actions", function()
|
bsw@9
|
5 ui.link{
|
bsw@9
|
6 content = function()
|
bsw@9
|
7 ui.image{ static = "icons/16/cancel.png" }
|
bsw@9
|
8 slot.put(_"Cancel")
|
bsw@9
|
9 end,
|
bsw@9
|
10 module = "index",
|
bsw@9
|
11 view = "index"
|
bsw@9
|
12 }
|
bsw@10
|
13
|
bsw@10
|
14 local setting_key = "liquidfeedback_frontend_developer_features"
|
bsw@10
|
15 local setting = Setting:by_pk(app.session.member.id, setting_key)
|
bsw@10
|
16
|
bsw@10
|
17 if setting then
|
bsw@10
|
18 ui.link{
|
bsw@10
|
19 content = function()
|
bsw@10
|
20 ui.image{ static = "icons/16/wrench.png" }
|
bsw@10
|
21 slot.put(_"Developer features")
|
bsw@10
|
22 end,
|
bsw@10
|
23 module = "member",
|
bsw@10
|
24 view = "developer_settings"
|
bsw@10
|
25 }
|
bsw@10
|
26 end
|
bsw@9
|
27 end)
|
bsw@9
|
28
|
bsw@9
|
29 ui.heading{ content = _"Change your name" }
|
bsw@9
|
30 util.help("member.settings.name", _"Change name")
|
bsw@9
|
31
|
bsw@9
|
32 ui.form{
|
bsw@9
|
33 attr = { class = "vertical" },
|
bsw@9
|
34 module = "member",
|
bsw@9
|
35 action = "update_name",
|
bsw@9
|
36 routing = {
|
bsw@9
|
37 ok = {
|
bsw@9
|
38 mode = "redirect",
|
bsw@9
|
39 module = "index",
|
bsw@9
|
40 view = "index"
|
bsw@9
|
41 }
|
bsw@9
|
42 },
|
bsw@9
|
43 content = function()
|
bsw@9
|
44 ui.field.text{ label = _"Name", name = "name", value = app.session.member.name }
|
bsw@9
|
45 ui.submit{ value = _"Change name" }
|
bsw@9
|
46 end
|
bsw@9
|
47 }
|
bsw@9
|
48
|
bsw@9
|
49 ui.heading{ content = _"Change your login" }
|
bsw@9
|
50 util.help("member.settings.login", _"Change login")
|
bsw@9
|
51
|
bsw@9
|
52 ui.form{
|
bsw@9
|
53 attr = { class = "vertical" },
|
bsw@9
|
54 module = "member",
|
bsw@9
|
55 action = "update_login",
|
bsw@9
|
56 routing = {
|
bsw@9
|
57 ok = {
|
bsw@9
|
58 mode = "redirect",
|
bsw@9
|
59 module = "index",
|
bsw@9
|
60 view = "index"
|
bsw@9
|
61 }
|
bsw@9
|
62 },
|
bsw@9
|
63 content = function()
|
bsw@9
|
64 ui.field.text{ label = _"Login", name = "login", value = app.session.member.login }
|
bsw@9
|
65 ui.submit{ value = _"Change login" }
|
bsw@9
|
66 end
|
bsw@9
|
67 }
|
bsw@9
|
68
|
bsw@9
|
69 ui.heading{ content = _"Change your password" }
|
bsw@9
|
70 util.help("member.settings.password", _"Change password")
|
bsw@9
|
71
|
bsw@9
|
72 ui.form{
|
bsw@9
|
73 attr = { class = "vertical" },
|
bsw@9
|
74 module = "member",
|
bsw@9
|
75 action = "update_password",
|
bsw@9
|
76 routing = {
|
bsw@9
|
77 ok = {
|
bsw@9
|
78 mode = "redirect",
|
bsw@9
|
79 module = "index",
|
bsw@9
|
80 view = "index"
|
bsw@9
|
81 }
|
bsw@9
|
82 },
|
bsw@9
|
83 content = function()
|
bsw@9
|
84 ui.field.password{ label = _"Old password", name = "old_password" }
|
bsw@9
|
85 ui.field.password{ label = _"New password", name = "new_password1" }
|
bsw@9
|
86 ui.field.password{ label = _"Repeat new password", name = "new_password2" }
|
bsw@9
|
87 ui.submit{ value = _"Change password" }
|
bsw@9
|
88 end
|
bsw@10
|
89 } |