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