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