| rev | 
   line source | 
| 
bsw@1045
 | 
     1 ui.titleMember(_"Email address")
 | 
| 
bsw@75
 | 
     2 
 | 
| 
bsw/jbe@1309
 | 
     3 ui.grid{ content = function()
 | 
| 
bsw/jbe@1309
 | 
     4   ui.cell_main{ content = function()
 | 
| 
bsw@75
 | 
     5 
 | 
| 
bsw/jbe@1309
 | 
     6     ui.container{ attr = { class = "mdl-card mdl-card__fullwidth mdl-shadow--2dp" }, content = function()
 | 
| 
bsw/jbe@1309
 | 
     7       ui.container{ attr = { class = "mdl-card__title mdl-card--border" }, content = function()
 | 
| 
bsw/jbe@1309
 | 
     8         ui.heading { attr = { class = "mdl-card__title-text" }, level = 2, content = _"Email address for notifications" }
 | 
| 
bsw/jbe@1309
 | 
     9       end }
 | 
| 
bsw/jbe@1309
 | 
    10       ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function()
 | 
| 
bsw@1045
 | 
    11 
 | 
| 
bsw/jbe@1309
 | 
    12         ui.form{
 | 
| 
bsw/jbe@1309
 | 
    13           attr = { class = "vertical" },
 | 
| 
bsw/jbe@1309
 | 
    14           module = "member",
 | 
| 
bsw/jbe@1309
 | 
    15           action = "update_email",
 | 
| 
bsw/jbe@1309
 | 
    16           routing = {
 | 
| 
bsw/jbe@1309
 | 
    17             ok = {
 | 
| 
bsw/jbe@1309
 | 
    18               mode = "redirect",
 | 
| 
bsw/jbe@1309
 | 
    19               module = "member",
 | 
| 
bsw/jbe@1309
 | 
    20               view = "settings"
 | 
| 
bsw/jbe@1309
 | 
    21             }
 | 
| 
bsw@1045
 | 
    22           },
 | 
| 
bsw/jbe@1309
 | 
    23           content = function()
 | 
| 
bsw/jbe@1309
 | 
    24             if app.session.member.notify_email then
 | 
| 
bsw/jbe@1309
 | 
    25               ui.field.text{ label = _"confirmed address", value = app.session.member.notify_email, readonly = true }
 | 
| 
bsw/jbe@1309
 | 
    26             end
 | 
| 
bsw/jbe@1309
 | 
    27             if app.session.member.notify_email_unconfirmed then
 | 
| 
bsw/jbe@1309
 | 
    28               ui.field.text{ label = _"unconfirmed address", value = app.session.member.notify_email_unconfirmed, readonly = true }
 | 
| 
bsw/jbe@1309
 | 
    29             end
 | 
| 
bsw/jbe@1309
 | 
    30             if app.session.member.notify_email or app.session.member.notify_email_unconfirmed then
 | 
| 
bsw/jbe@1309
 | 
    31               slot.put("<br />")
 | 
| 
bsw/jbe@1309
 | 
    32             end
 | 
| 
bsw/jbe@1309
 | 
    33             ui.heading { level = 4, content = _"Enter a new email address:" }
 | 
| 
bsw/jbe@1309
 | 
    34             ui.field.text{
 | 
| 
bsw/jbe@1309
 | 
    35               container_attr = { class = "mdl-textfield mdl-js-textfield mdl-textfield--floating-label" },
 | 
| 
bsw/jbe@1309
 | 
    36               attr = { id = "lf-member__notify_email", class = "mdl-textfield__input" },
 | 
| 
bsw/jbe@1309
 | 
    37               label_attr = { class = "mdl-textfield__label", ["for"] = "lf-member__notify_email" },
 | 
| 
bsw/jbe@1309
 | 
    38               label     = _'email address',
 | 
| 
bsw/jbe@1309
 | 
    39               name = 'email',
 | 
| 
bsw/jbe@1309
 | 
    40               value     = ''
 | 
| 
bsw/jbe@1309
 | 
    41             }
 | 
| 
bsw/jbe@1309
 | 
    42             slot.put("<br />")
 | 
| 
bsw/jbe@1309
 | 
    43             ui.tag{
 | 
| 
bsw/jbe@1309
 | 
    44               tag = "input",
 | 
| 
bsw/jbe@1309
 | 
    45               attr = {
 | 
| 
bsw/jbe@1309
 | 
    46           type = "submit",
 | 
| 
bsw/jbe@1309
 | 
    47           class = "mdl-button mdl-js-button mdl-button--raised mdl-button--colored",
 | 
| 
bsw/jbe@1309
 | 
    48           value = _"Save"
 | 
| 
bsw/jbe@1309
 | 
    49               },
 | 
| 
bsw/jbe@1309
 | 
    50               content = ""
 | 
| 
bsw/jbe@1309
 | 
    51             }
 | 
| 
bsw/jbe@1309
 | 
    52             slot.put("   ")
 | 
| 
bsw@1644
 | 
    53             ui.link {
 | 
| 
bsw@1644
 | 
    54               attr = { class = "mdl-button mdl-js-button" },
 | 
| 
bsw@1644
 | 
    55               module = "member", view = "show", id = app.session.member_id,
 | 
| 
bsw@1644
 | 
    56               content = _"Cancel"
 | 
| 
bsw/jbe@1309
 | 
    57             }
 | 
| 
bsw/jbe@1309
 | 
    58           end
 | 
| 
bsw@1045
 | 
    59         }
 | 
| 
bsw/jbe@1309
 | 
    60 
 | 
| 
bsw/jbe@1309
 | 
    61       end }
 | 
| 
bsw/jbe@1309
 | 
    62     end }
 | 
| 
bsw/jbe@1309
 | 
    63   end }
 | 
| 
bsw@75
 | 
    64 
 | 
| 
bsw/jbe@1309
 | 
    65   ui.cell_sidebar{ content = function()
 | 
| 
bsw/jbe@1309
 | 
    66     execute.view {
 | 
| 
bsw/jbe@1309
 | 
    67       module = "member", view = "_sidebar_whatcanido", params = {
 | 
| 
bsw/jbe@1309
 | 
    68         member = app.session.member
 | 
| 
bsw/jbe@1309
 | 
    69       }
 | 
| 
bsw/jbe@1309
 | 
    70     }
 | 
| 
bsw/jbe@1309
 | 
    71   end }
 | 
| 
bsw/jbe@1309
 | 
    72 
 | 
| 
bsw/jbe@1309
 | 
    73 end }
 |