liquid_feedback_frontend
view app/main/member/edit.lua @ 280:808269b7f41c
More repositioning and optical enhancements
author | bsw |
---|---|
date | Thu Feb 16 14:08:55 2012 +0100 (2012-02-16) |
parents | 733f65c0c0a0 |
children | c587d8762e62 |
line source
1 slot.put_into("title", _"Edit my profile")
3 slot.select("actions", function()
4 ui.link{
5 content = function()
6 ui.image{ static = "icons/16/cancel.png" }
7 slot.put(_"Cancel")
8 end,
9 module = "index",
10 view = "index"
11 }
12 end)
14 util.help("member.edit", _"Edit my page")
16 ui.form{
17 record = app.session.member,
18 attr = { class = "vertical" },
19 module = "member",
20 action = "update",
21 routing = {
22 ok = {
23 mode = "redirect",
24 module = "index",
25 view = "index"
26 }
27 },
28 content = function()
29 ui.field.text{ label = _"Organizational unit", name = "organizational_unit" }
30 ui.field.text{ label = _"Internal posts", name = "internal_posts" }
31 ui.field.text{ label = _"Real name", name = "realname" }
32 ui.field.text{ label = _"Birthday" .. " YYYY-MM-DD ", name = "birthday", attr = { id = "profile_birthday" } }
33 ui.script{ static = "gregor.js/gregor.js" }
34 util.gregor("profile_birthday", "document.getElementById('timeline_search_date').form.submit();")
35 ui.field.text{ label = _"Address", name = "address", multiline = true }
36 ui.field.text{ label = _"email", name = "email" }
37 ui.field.text{ label = _"xmpp", name = "xmpp_address" }
38 ui.field.text{ label = _"Website", name = "website" }
39 ui.field.text{ label = _"Phone", name = "phone" }
40 ui.field.text{ label = _"Mobile phone", name = "mobile_phone" }
41 ui.field.text{ label = _"Profession", name = "profession" }
42 ui.field.text{ label = _"External memberships", name = "external_memberships", multiline = true }
43 ui.field.text{ label = _"External posts", name = "external_posts", multiline = true }
45 ui.field.select{
46 label = _"Wiki engine for statement",
47 name = "formatting_engine",
48 foreign_records = {
49 { id = "rocketwiki", name = "RocketWiki" },
50 { id = "compat", name = _"Traditional wiki syntax" }
51 },
52 attr = {id = "formatting_engine"},
53 foreign_id = "id",
54 foreign_name = "name",
55 value = param.get("formatting_engine")
56 }
57 ui.tag{
58 tag = "div",
59 content = function()
60 ui.tag{
61 tag = "label",
62 attr = { class = "ui_field_label" },
63 content = function() slot.put(" ") end,
64 }
65 ui.tag{
66 content = function()
67 ui.link{
68 text = _"Syntax help",
69 module = "help",
70 view = "show",
71 id = "wikisyntax",
72 attr = {onClick="this.href=this.href.replace(/wikisyntax[^.]*/g, 'wikisyntax_'+getElementById('formatting_engine').value)"}
73 }
74 slot.put(" ")
75 ui.link{
76 text = _"(new window)",
77 module = "help",
78 view = "show",
79 id = "wikisyntax",
80 attr = {target = "_blank", onClick="this.href=this.href.replace(/wikisyntax[^.]*/g, 'wikisyntax_'+getElementById('formatting_engine').value)"}
81 }
82 end
83 }
84 end
85 }
86 ui.field.text{
87 label = _"Statement",
88 name = "statement",
89 multiline = true,
90 attr = { style = "height: 50ex;" },
91 value = param.get("statement")
92 }
95 ui.submit{ value = _"Save" }
96 end
97 }