liquid_feedback_frontend
diff app/main/member/settings_email.lua @ 1309:32cc544d5a5b
Cumulative patch for upcoming frontend version 4
author | bsw/jbe |
---|---|
date | Sun Jul 15 14:07:29 2018 +0200 (2018-07-15) |
parents | 701a5cf6b067 |
children | 678c7146f27b |
line diff
1.1 --- a/app/main/member/settings_email.lua Thu Jun 23 03:30:57 2016 +0200 1.2 +++ b/app/main/member/settings_email.lua Sun Jul 15 14:07:29 2018 +0200 1.3 @@ -1,59 +1,73 @@ 1.4 ui.titleMember(_"Email address") 1.5 1.6 -execute.view { 1.7 - module = "member", view = "_sidebar_whatcanido", params = { 1.8 - member = app.session.member 1.9 - } 1.10 -} 1.11 +ui.grid{ content = function() 1.12 + ui.cell_main{ content = function() 1.13 1.14 -ui.form{ 1.15 - attr = { class = "vertical" }, 1.16 - module = "member", 1.17 - action = "update_email", 1.18 - routing = { 1.19 - ok = { 1.20 - mode = "redirect", 1.21 - module = "member", 1.22 - view = "show", 1.23 - id = app.session.member_id 1.24 - } 1.25 - }, 1.26 - content = function() 1.27 - ui.section( function() 1.28 - 1.29 - ui.sectionHead( function() 1.30 - ui.heading { level = 1, content = _"Email address for notifications" } 1.31 - end ) 1.32 + ui.container{ attr = { class = "mdl-card mdl-card__fullwidth mdl-shadow--2dp" }, content = function() 1.33 + ui.container{ attr = { class = "mdl-card__title mdl-card--border" }, content = function() 1.34 + ui.heading { attr = { class = "mdl-card__title-text" }, level = 2, content = _"Email address for notifications" } 1.35 + end } 1.36 + ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function() 1.37 1.38 - ui.sectionRow( function() 1.39 - if app.session.member.notify_email then 1.40 - ui.field.text{ label = _"confirmed address", value = app.session.member.notify_email, readonly = true } 1.41 - end 1.42 - if app.session.member.notify_email_unconfirmed then 1.43 - ui.field.text{ label = _"unconfirmed address", value = app.session.member.notify_email_unconfirmed, readonly = true } 1.44 - end 1.45 - if app.session.member.notify_email or app.session.member.notify_email_unconfirmed then 1.46 - slot.put("<br />") 1.47 - end 1.48 - ui.heading { level = 2, content = _"Enter a new email address:" } 1.49 - ui.field.text{ name = "email" } 1.50 - slot.put("<br />") 1.51 - ui.tag{ 1.52 - tag = "input", 1.53 - attr = { 1.54 - type = "submit", 1.55 - class = "btn btn-default", 1.56 - value = _"Save" 1.57 + ui.form{ 1.58 + attr = { class = "vertical" }, 1.59 + module = "member", 1.60 + action = "update_email", 1.61 + routing = { 1.62 + ok = { 1.63 + mode = "redirect", 1.64 + module = "member", 1.65 + view = "settings" 1.66 + } 1.67 }, 1.68 - content = "" 1.69 + content = function() 1.70 + if app.session.member.notify_email then 1.71 + ui.field.text{ label = _"confirmed address", value = app.session.member.notify_email, readonly = true } 1.72 + end 1.73 + if app.session.member.notify_email_unconfirmed then 1.74 + ui.field.text{ label = _"unconfirmed address", value = app.session.member.notify_email_unconfirmed, readonly = true } 1.75 + end 1.76 + if app.session.member.notify_email or app.session.member.notify_email_unconfirmed then 1.77 + slot.put("<br />") 1.78 + end 1.79 + ui.heading { level = 4, content = _"Enter a new email address:" } 1.80 + ui.field.text{ 1.81 + container_attr = { class = "mdl-textfield mdl-js-textfield mdl-textfield--floating-label" }, 1.82 + attr = { id = "lf-member__notify_email", class = "mdl-textfield__input" }, 1.83 + label_attr = { class = "mdl-textfield__label", ["for"] = "lf-member__notify_email" }, 1.84 + label = _'email address', 1.85 + name = 'email', 1.86 + value = '' 1.87 + } 1.88 + slot.put("<br />") 1.89 + ui.tag{ 1.90 + tag = "input", 1.91 + attr = { 1.92 + type = "submit", 1.93 + class = "mdl-button mdl-js-button mdl-button--raised mdl-button--colored", 1.94 + value = _"Save" 1.95 + }, 1.96 + content = "" 1.97 + } 1.98 + slot.put(" ") 1.99 + ui.link{ 1.100 + attr = { class = "mdl-button mdl-js-button mdl-button--raised" }, 1.101 + content = _"Cancel", 1.102 + module = "member", view = "settings" 1.103 + } 1.104 + end 1.105 } 1.106 - slot.put("<br /><br /><br />") 1.107 - ui.link{ 1.108 - content = _"Cancel", 1.109 - module = "member", view = "show", id = app.session.member.id 1.110 - } 1.111 - end ) 1.112 - end ) 1.113 - end 1.114 -} 1.115 + 1.116 + end } 1.117 + end } 1.118 + end } 1.119 1.120 + ui.cell_sidebar{ content = function() 1.121 + execute.view { 1.122 + module = "member", view = "_sidebar_whatcanido", params = { 1.123 + member = app.session.member 1.124 + } 1.125 + } 1.126 + end } 1.127 + 1.128 +end }