liquid_feedback_frontend

annotate app/main/member/edit.lua @ 284:38dbcd510657

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

Impressum / About Us