liquid_feedback_frontend
view app/main/member/settings_email.lua @ 1181:d83ecd35458c
Fixed usage of a global variable
| author | bsw | 
|---|---|
| date | Thu Mar 26 20:13:39 2015 +0100 (2015-03-26) | 
| parents | 701a5cf6b067 | 
| children | 32cc544d5a5b | 
 line source
     1 ui.titleMember(_"Email address")
     3 execute.view {
     4   module = "member", view = "_sidebar_whatcanido", params = {
     5     member = app.session.member
     6   }
     7 }
     9 ui.form{
    10   attr = { class = "vertical" },
    11   module = "member",
    12   action = "update_email",
    13   routing = {
    14     ok = {
    15       mode = "redirect",
    16       module = "member",
    17       view = "show",
    18       id = app.session.member_id
    19     }
    20   },
    21   content = function()
    22     ui.section( function()
    24       ui.sectionHead( function()
    25         ui.heading { level = 1, content = _"Email address for notifications" }
    26       end )
    28       ui.sectionRow( function()
    29         if app.session.member.notify_email then
    30           ui.field.text{ label = _"confirmed address", value = app.session.member.notify_email, readonly = true }
    31         end
    32         if app.session.member.notify_email_unconfirmed then
    33           ui.field.text{ label = _"unconfirmed address", value = app.session.member.notify_email_unconfirmed, readonly = true }
    34         end
    35         if app.session.member.notify_email or app.session.member.notify_email_unconfirmed then
    36           slot.put("<br />")
    37         end
    38         ui.heading { level = 2, content = _"Enter a new email address:" }
    39         ui.field.text{ name = "email" }
    40         slot.put("<br />")
    41         ui.tag{
    42           tag = "input",
    43           attr = {
    44             type = "submit",
    45             class = "btn btn-default",
    46             value = _"Save"
    47           },
    48           content = ""
    49         }
    50         slot.put("<br /><br /><br />")
    51         ui.link{
    52           content = _"Cancel",
    53           module = "member", view = "show", id = app.session.member.id
    54         }
    55       end )
    56     end )
    57   end
    58 }
