liquid_feedback_frontend
view app/main/member/settings_name.lua @ 1751:ddbd46a34b6a
Allow API lookup of member profile fields
| author | bsw | 
|---|---|
| date | Tue Oct 12 15:37:28 2021 +0200 (2021-10-12) | 
| parents | 678c7146f27b | 
| children | 
 line source
     1 ui.titleMember(_"Screen name")
     3 ui.grid{ content = function()
     5   ui.cell_main{ content = function()
     6     ui.container{ attr = { class = "mdl-card mdl-card__fullwidth mdl-shadow--2dp" }, content = function()
     7       ui.container{ attr = { class = "mdl-card__title mdl-card--border" }, content = function()
     8         ui.heading { attr = { class = "mdl-card__title-text" }, level = 2, content = _"Screen name" }
     9       end }
    10       ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function()
    12         ui.form{
    13           attr = { class = "wide" },
    14           module = "member",
    15           action = "update_name",
    16           routing = {
    17             ok = {
    18               mode = "redirect",
    19               module = "member",
    20               view = "settings"
    21             }
    22           },
    23           content = function()
    24             ui.field.text{
    25               container_attr = { class = "mdl-textfield mdl-js-textfield mdl-textfield--floating-label" },
    26               attr = { id = "lf-member__name", class = "mdl-textfield__input" },
    27               label_attr = { class = "mdl-textfield__label", ["for"] = "lf-member__name" },
    28               label= _'Screen name',
    29               name = 'name',
    30               value = app.session.member.name
    31             }
    33             slot.put("<br />")
    35             ui.tag{
    36               tag = "input",
    37               attr = {
    38           type = "submit",
    39           class = "mdl-button mdl-js-button mdl-button--raised mdl-button--colored",
    40           value = _"Save"
    41               },
    42               content = ""
    43             }
    44             slot.put("   ")
    45             ui.link {
    46               attr = { class = "mdl-button mdl-js-button" },
    47               module = "member", view = "show", id = app.session.member_id,
    48               content = _"Cancel"
    49             }
    50           end
    51         }
    53       end }
    54     end }
    55   end }
    57   ui.cell_sidebar{ content = function()
    58     execute.view {
    59       module = "member", view = "_sidebar_whatcanido", params = {
    60         member = app.session.member
    61       }
    62     }
    63   end }
    65 end }
