liquid_feedback_frontend

view app/main/member/edit.lua @ 1304:0bae319805ff

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

Impressum / About Us