liquid_feedback_frontend

view app/main/member/_profile.lua @ 1858:3d1f0464a3ea

Handle missing ldap.member.allowed function
author bsw
date Tue Sep 20 17:35:29 2022 +0200 (20 months ago)
parents ce812dccaac2
children
line source
1 local member = param.get("member", "table")
3 local for_registration = param.get("for_registration", atom.boolean)
5 ui.form{
6 attr = { class = "form" },
7 record = member,
8 readonly = true,
9 content = function()
11 if not for_registration and MemberImage:by_pk(member.id, "photo", true) then
12 ui.container { attr = { class = "member_photo" }, content = function()
13 execute.view{
14 module = "member_image",
15 view = "_show",
16 params = {
17 member = member,
18 image_type = "photo",
19 force_update = app.session.member_id == member.id
20 }
21 }
22 end }
23 end
25 if member.identification then
26 ui.field.text{ label = _"Identification", name = "identification" }
27 end
28 if member.name then
29 ui.field.text{ label = _"Screen name", name = "name" }
30 end
31 if for_registration and member.login then
32 ui.field.text{ label = _"Login name", name = "login" }
33 end
35 if for_registration and member.notify_email then
36 ui.field.text{ label = _"Notification email", name = "notify_email" }
37 end
38 if member.profile then
39 local profile = member.profile.profile or {}
40 if config.member_profile_fields then
41 for i, field in ipairs(config.member_profile_fields) do
42 if profile[field.id] and #(profile[field.id]) > 0 then
43 ui.field.text{ label = field.name, name = field.id, value = profile[field.id] }
44 end
45 end
46 end
47 end
49 if member.admin then
50 ui.field.boolean{ label = _"Admin?", name = "admin" }
51 end
52 if member.locked then
53 ui.field.boolean{ label = _"Locked?", name = "locked" }
54 end
55 if member.last_activity then
56 ui.field.text{ label = _"Last activity (updated daily)", value = format.date(member.last_activity) or _"not yet" }
57 end
58 if member.profile and member.profile.statement and #member.profile.statement > 0 then
59 slot.put("<br />")
60 slot.put("<br />")
61 ui.container{
62 attr = { class = " wiki" },
63 content = function()
64 slot.put(member.profile:get_content("html"))
65 end
66 }
67 end
68 end
69 }

Impressum / About Us