liquid_feedback_frontend

diff app/main/member/settings_email.lua @ 1045:701a5cf6b067

Imported LiquidFeedback Frontend 3.0 branch
author bsw
date Thu Jul 10 01:19:48 2014 +0200 (2014-07-10)
parents 418b590fa9ed
children 32cc544d5a5b
line diff
     1.1 --- a/app/main/member/settings_email.lua	Thu Jul 10 01:02:43 2014 +0200
     1.2 +++ b/app/main/member/settings_email.lua	Thu Jul 10 01:19:48 2014 +0200
     1.3 @@ -1,6 +1,10 @@
     1.4 -ui.title(_"Change your notification email address")
     1.5 +ui.titleMember(_"Email address")
     1.6  
     1.7 -util.help("member.settings.email_address", _"Change email")
     1.8 +execute.view {
     1.9 +  module = "member", view = "_sidebar_whatcanido", params = {
    1.10 +    member = app.session.member
    1.11 +  }
    1.12 +}
    1.13  
    1.14  ui.form{
    1.15    attr = { class = "vertical" },
    1.16 @@ -9,19 +13,47 @@
    1.17    routing = {
    1.18      ok = {
    1.19        mode = "redirect",
    1.20 -      module = "index",
    1.21 -      view = "index"
    1.22 +      module = "member",
    1.23 +      view = "show",
    1.24 +      id = app.session.member_id
    1.25      }
    1.26    },
    1.27    content = function()
    1.28 -    if app.session.member.notify_email then
    1.29 -      ui.field.text{ label = _"Confirmed address", value = app.session.member.notify_email, readonly = true }
    1.30 -    end
    1.31 -    if app.session.member.notify_email_unconfirmed then
    1.32 -      ui.field.text{ label = _"Unconfirmed address", value = app.session.member.notify_email_unconfirmed, readonly = true }
    1.33 -    end
    1.34 -    ui.field.text{ label = _"New address", name = "email" }
    1.35 -    ui.submit{ value = _"Change email" }
    1.36 +    ui.section( function()
    1.37 +
    1.38 +      ui.sectionHead( function()
    1.39 +        ui.heading { level = 1, content = _"Email address for notifications" }
    1.40 +      end )
    1.41 +
    1.42 +      ui.sectionRow( function()
    1.43 +        if app.session.member.notify_email then
    1.44 +          ui.field.text{ label = _"confirmed address", value = app.session.member.notify_email, readonly = true }
    1.45 +        end
    1.46 +        if app.session.member.notify_email_unconfirmed then
    1.47 +          ui.field.text{ label = _"unconfirmed address", value = app.session.member.notify_email_unconfirmed, readonly = true }
    1.48 +        end
    1.49 +        if app.session.member.notify_email or app.session.member.notify_email_unconfirmed then
    1.50 +          slot.put("<br />")
    1.51 +        end
    1.52 +        ui.heading { level = 2, content = _"Enter a new email address:" }
    1.53 +        ui.field.text{ name = "email" }
    1.54 +        slot.put("<br />")
    1.55 +        ui.tag{
    1.56 +          tag = "input",
    1.57 +          attr = {
    1.58 +            type = "submit",
    1.59 +            class = "btn btn-default",
    1.60 +            value = _"Save"
    1.61 +          },
    1.62 +          content = ""
    1.63 +        }
    1.64 +        slot.put("<br /><br /><br />")
    1.65 +        ui.link{
    1.66 +          content = _"Cancel",
    1.67 +          module = "member", view = "show", id = app.session.member.id
    1.68 +        }
    1.69 +      end )
    1.70 +    end )
    1.71    end
    1.72  }
    1.73  

Impressum / About Us