bsw/jbe@4: slot.put_into("title", _"Edit my profile") bsw/jbe@0: bsw/jbe@0: slot.select("actions", function() bsw/jbe@0: ui.link{ bsw/jbe@0: content = function() bsw/jbe@0: ui.image{ static = "icons/16/cancel.png" } bsw/jbe@0: slot.put(_"Cancel") bsw/jbe@0: end, bsw/jbe@0: module = "index", bsw/jbe@0: view = "index" bsw/jbe@0: } bsw/jbe@0: end) bsw/jbe@0: bsw/jbe@4: util.help("member.edit", _"Edit my page") bsw/jbe@4: bsw/jbe@0: ui.form{ bsw/jbe@0: record = app.session.member, bsw/jbe@0: attr = { class = "vertical" }, bsw/jbe@0: module = "member", bsw/jbe@0: action = "update", bsw/jbe@0: routing = { bsw/jbe@0: ok = { bsw/jbe@0: mode = "redirect", bsw/jbe@0: module = "index", bsw/jbe@0: view = "index" bsw/jbe@0: } bsw/jbe@0: }, bsw/jbe@0: content = function() bsw@286: ui.field.text{ label = _"Identification", name = "identification", readonly = true } bsw@286: ui.field.text{ label = _"Organizational unit", name = "organizational_unit", readonly = config.locked_profile_fields.organizational_unit } bsw@286: ui.field.text{ label = _"Internal posts", name = "internal_posts", readonly = config.locked_profile_fields.internal_posts } bsw@286: ui.field.text{ label = _"Real name", name = "realname", readonly = config.locked_profile_fields.realname } bsw@286: ui.field.text{ label = _"Birthday" .. " YYYY-MM-DD ", name = "birthday", attr = { id = "profile_birthday" }, readonly = config.locked_profile_fields.birthday } bsw@75: ui.script{ static = "gregor.js/gregor.js" } bsw@75: util.gregor("profile_birthday", "document.getElementById('timeline_search_date').form.submit();") bsw@286: ui.field.text{ label = _"Address", name = "address", multiline = true, readonly = config.locked_profile_fields.address } bsw@286: ui.field.text{ label = _"email", name = "email", readonly = config.locked_profile_fields.email } bsw@286: ui.field.text{ label = _"xmpp", name = "xmpp_address", readonly = config.locked_profile_fields.xmpp_address } bsw@286: ui.field.text{ label = _"Website", name = "website", readonly = config.locked_profile_fields.website } bsw@286: ui.field.text{ label = _"Phone", name = "phone", readonly = config.locked_profile_fields.phone } bsw@286: ui.field.text{ label = _"Mobile phone", name = "mobile_phone", readonly = config.locked_profile_fields.mobile_phone } bsw@286: ui.field.text{ label = _"Profession", name = "profession", readonly = config.locked_profile_fields.profession } bsw@286: ui.field.text{ label = _"External memberships", name = "external_memberships", multiline = true, readonly = config.locked_profile_fields.external_memberships } bsw@286: ui.field.text{ label = _"External posts", name = "external_posts", multiline = true, readonly = config.locked_profile_fields.external_posts } bsw@280: bsw@280: ui.field.select{ bsw@280: label = _"Wiki engine for statement", bsw@280: name = "formatting_engine", bsw@280: foreign_records = { bsw@280: { id = "rocketwiki", name = "RocketWiki" }, bsw@280: { id = "compat", name = _"Traditional wiki syntax" } bsw@280: }, bsw@280: attr = {id = "formatting_engine"}, bsw@280: foreign_id = "id", bsw@280: foreign_name = "name", bsw@280: value = param.get("formatting_engine") bsw@280: } bsw@280: ui.tag{ bsw@280: tag = "div", bsw@280: content = function() bsw@280: ui.tag{ bsw@280: tag = "label", bsw@280: attr = { class = "ui_field_label" }, bsw@280: content = function() slot.put(" ") end, bsw@280: } bsw@280: ui.tag{ bsw@280: content = function() bsw@280: ui.link{ bsw@280: text = _"Syntax help", bsw@280: module = "help", bsw@280: view = "show", bsw@280: id = "wikisyntax", bsw@280: attr = {onClick="this.href=this.href.replace(/wikisyntax[^.]*/g, 'wikisyntax_'+getElementById('formatting_engine').value)"} bsw@280: } bsw@280: slot.put(" ") bsw@280: ui.link{ bsw@280: text = _"(new window)", bsw@280: module = "help", bsw@280: view = "show", bsw@280: id = "wikisyntax", bsw@280: attr = {target = "_blank", onClick="this.href=this.href.replace(/wikisyntax[^.]*/g, 'wikisyntax_'+getElementById('formatting_engine').value)"} bsw@280: } bsw@280: end bsw@280: } bsw@280: end bsw@280: } bsw@280: ui.field.text{ bsw@280: label = _"Statement", bsw@280: name = "statement", bsw@280: multiline = true, bsw@280: attr = { style = "height: 50ex;" }, bsw@280: value = param.get("statement") bsw@280: } bsw@280: bsw@280: bsw/jbe@0: ui.submit{ value = _"Save" } bsw/jbe@0: end bsw/jbe@0: }