rev |
line source |
bsw@1045
|
1 ui.titleMember(_"Edit your profile data")
|
bsw/jbe@0
|
2
|
bsw@1045
|
3 execute.view {
|
bsw@1045
|
4 module = "member", view = "_sidebar_whatcanido", params = {
|
bsw@1045
|
5 member = app.session.member
|
bsw@1045
|
6 }
|
bsw@1045
|
7 }
|
bsw/jbe@4
|
8
|
bsw/jbe@0
|
9 ui.form{
|
bsw/jbe@0
|
10 record = app.session.member,
|
bsw/jbe@0
|
11 attr = { class = "vertical" },
|
bsw/jbe@0
|
12 module = "member",
|
bsw/jbe@0
|
13 action = "update",
|
bsw/jbe@0
|
14 routing = {
|
bsw/jbe@0
|
15 ok = {
|
bsw/jbe@0
|
16 mode = "redirect",
|
bsw@564
|
17 module = "member",
|
bsw@564
|
18 view = "show",
|
bsw@564
|
19 id = app.session.member_id
|
bsw/jbe@0
|
20 }
|
bsw/jbe@0
|
21 },
|
bsw/jbe@0
|
22 content = function()
|
bsw@1045
|
23
|
bsw@1045
|
24 ui.section( function()
|
bsw@1045
|
25
|
bsw@1045
|
26 ui.sectionHead( function()
|
bsw@1045
|
27 ui.heading{ level = 1, content = _"Edit your profile data" }
|
bsw@1045
|
28 end )
|
bsw@1045
|
29
|
bsw@1045
|
30 ui.sectionRow( _"All fields are optional. Please enter only data which should be published." )
|
bsw@1045
|
31
|
bsw@1045
|
32 ui.sectionRow( function()
|
bsw@1045
|
33
|
bsw@1045
|
34 ui.field.text{ label = _"Organizational unit", name = "organizational_unit", readonly = config.locked_profile_fields.organizational_unit }
|
bsw@1045
|
35 ui.field.text{ label = _"Internal posts", name = "internal_posts", readonly = config.locked_profile_fields.internal_posts }
|
bsw@1045
|
36 ui.field.text{ label = _"Real name", name = "realname", readonly = config.locked_profile_fields.realname }
|
bsw@1045
|
37 ui.field.text{ label = _"Birthday" .. " YYYY-MM-DD ", name = "birthday", attr = { id = "profile_birthday" }, readonly = config.locked_profile_fields.birthday }
|
bsw@1045
|
38 ui.script{ static = "gregor.js/gregor.js" }
|
bsw@1045
|
39 util.gregor("profile_birthday", "document.getElementById('timeline_search_date').form.submit();")
|
bsw@1045
|
40 ui.field.text{ label = _"Address", name = "address", multiline = true, readonly = config.locked_profile_fields.address }
|
bsw@1045
|
41 ui.field.text{ label = _"email", name = "email", readonly = config.locked_profile_fields.email }
|
bsw@1045
|
42 ui.field.text{ label = _"xmpp", name = "xmpp_address", readonly = config.locked_profile_fields.xmpp_address }
|
bsw@1045
|
43 ui.field.text{ label = _"Website", name = "website", readonly = config.locked_profile_fields.website }
|
bsw@1045
|
44 ui.field.text{ label = _"Phone", name = "phone", readonly = config.locked_profile_fields.phone }
|
bsw@1045
|
45 ui.field.text{ label = _"Mobile phone", name = "mobile_phone", readonly = config.locked_profile_fields.mobile_phone }
|
bsw@1045
|
46 ui.field.text{ label = _"Profession", name = "profession", readonly = config.locked_profile_fields.profession }
|
bsw@1045
|
47 ui.field.text{ label = _"External memberships", name = "external_memberships", multiline = true, readonly = config.locked_profile_fields.external_memberships }
|
bsw@1045
|
48 ui.field.text{ label = _"External posts", name = "external_posts", multiline = true, readonly = config.locked_profile_fields.external_posts }
|
bsw@280
|
49
|
bsw@1045
|
50 if not config.enforce_formatting_engine then
|
bsw@1045
|
51 ui.field.select{
|
bsw@1045
|
52 label = _"Wiki engine for statement",
|
bsw@1045
|
53 name = "formatting_engine",
|
bsw@1045
|
54 foreign_records = config.formatting_engines,
|
bsw@1045
|
55 attr = {id = "formatting_engine"},
|
bsw@1045
|
56 foreign_id = "id",
|
bsw@1045
|
57 foreign_name = "name",
|
bsw@1045
|
58 value = param.get("formatting_engine")
|
bsw@1045
|
59 }
|
bsw@1045
|
60 ui.tag{
|
bsw@1045
|
61 tag = "div",
|
bsw@1045
|
62 content = function()
|
bsw@1045
|
63 ui.tag{
|
bsw@1045
|
64 tag = "label",
|
bsw@1045
|
65 attr = { class = "ui_field_label" },
|
bsw@1045
|
66 content = function() slot.put(" ") end,
|
bsw@1045
|
67 }
|
bsw@1045
|
68 ui.tag{
|
bsw@1045
|
69 content = function()
|
bsw@1045
|
70 ui.link{
|
bsw@1045
|
71 text = _"Syntax help",
|
bsw@1045
|
72 module = "help",
|
bsw@1045
|
73 view = "show",
|
bsw@1045
|
74 id = "wikisyntax",
|
bsw@1045
|
75 attr = {onClick="this.href=this.href.replace(/wikisyntax[^.]*/g, 'wikisyntax_'+getElementById('formatting_engine').value)"}
|
bsw@1045
|
76 }
|
bsw@1045
|
77 slot.put(" ")
|
bsw@1045
|
78 ui.link{
|
bsw@1045
|
79 text = _"(new window)",
|
bsw@1045
|
80 module = "help",
|
bsw@1045
|
81 view = "show",
|
bsw@1045
|
82 id = "wikisyntax",
|
bsw@1045
|
83 attr = {target = "_blank", onClick="this.href=this.href.replace(/wikisyntax[^.]*/g, 'wikisyntax_'+getElementById('formatting_engine').value)"}
|
bsw@1045
|
84 }
|
bsw@1045
|
85 end
|
bsw@1045
|
86 }
|
bsw@1045
|
87 end
|
bsw@1045
|
88 }
|
bsw@1045
|
89 end
|
bsw@1045
|
90 ui.field.text{
|
bsw@1045
|
91 label = _"Statement",
|
bsw@1045
|
92 name = "statement",
|
bsw@1045
|
93 multiline = true,
|
bsw@1045
|
94 attr = { style = "height: 50ex;" },
|
bsw@1045
|
95 value = param.get("statement")
|
bsw@280
|
96 }
|
bsw@1045
|
97 slot.put("<br />")
|
bsw@1045
|
98 ui.container{ attr = { class = "actions" }, content = function()
|
bsw@1045
|
99 ui.tag{
|
bsw@1045
|
100 tag = "input",
|
bsw@1045
|
101 attr = {
|
bsw@1045
|
102 type = "submit",
|
bsw@1045
|
103 class = "btn btn-default",
|
bsw@1045
|
104 value = _"publish profile data"
|
bsw@1045
|
105 },
|
bsw@1045
|
106 content = ""
|
bsw@1045
|
107 }
|
bsw@1045
|
108 slot.put("<br /><br /><br />")
|
bsw@1045
|
109 ui.link{
|
bsw@1045
|
110 content = _"cancel",
|
bsw@1045
|
111 module = "member", view = "show", id = app.session.member.id
|
bsw@1045
|
112 }
|
bsw@1045
|
113 end }
|
bsw@1045
|
114 end )
|
bsw@1045
|
115 end )
|
bsw/jbe@0
|
116 end
|
bsw/jbe@0
|
117 } |