liquid_feedback_frontend
diff app/main/member/settings_password.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_password.lua Thu Jun 23 03:30:57 2016 +0200 1.2 +++ b/app/main/member/settings_password.lua Sun Jul 15 14:07:29 2018 +0200 1.3 @@ -1,58 +1,88 @@ 1.4 ui.titleMember(_"Password") 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.container{ attr = { class = "mdl-card mdl-card__fullwidth mdl-shadow--2dp" }, content = function() 1.15 + ui.container{ attr = { class = "mdl-card__title mdl-card--border" }, content = function() 1.16 + ui.heading { attr = { class = "mdl-card__title-text" }, level = 2, content = _"Password" } 1.17 + end } 1.18 + ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function() 1.19 1.20 -ui.form{ 1.21 - attr = { class = "wide" }, 1.22 - module = "member", 1.23 - action = "update_password", 1.24 - routing = { 1.25 - ok = { 1.26 - mode = "redirect", 1.27 - module = "member", 1.28 - view = "show", 1.29 - id = app.session.member_id 1.30 - } 1.31 - }, 1.32 - content = function() 1.33 - ui.section( function() 1.34 - ui.sectionHead( function() 1.35 - ui.heading { level = 1, content = _"Password" } 1.36 - end ) 1.37 + ui.form{ 1.38 + attr = { class = "wide" }, 1.39 + module = "member", 1.40 + action = "update_password", 1.41 + routing = { 1.42 + ok = { 1.43 + mode = "redirect", 1.44 + module = "member", 1.45 + view = "settings" 1.46 + } 1.47 + }, 1.48 + content = function() 1.49 1.50 - ui.sectionRow( function() 1.51 - ui.heading { level = 2, content = _"Enter your current password:" } 1.52 - ui.field.password{ name = "old_password" } 1.53 + ui.field.password{ 1.54 + container_attr = { class = "mdl-textfield mdl-js-textfield mdl-textfield--floating-label" }, 1.55 + attr = { id = "lf-member__old_password", class = "mdl-textfield__input" }, 1.56 + label_attr = { class = "mdl-textfield__label", ["for"] = "lf-member__old_password" }, 1.57 + label= _'Curent password', 1.58 + name = 'old_password', 1.59 + value = "" 1.60 + } 1.61 + 1.62 + slot.put("<br />") 1.63 + 1.64 + ui.field.password{ 1.65 + container_attr = { class = "mdl-textfield mdl-js-textfield mdl-textfield--floating-label" }, 1.66 + attr = { id = "lf-member__new_password1", class = "mdl-textfield__input" }, 1.67 + label_attr = { class = "mdl-textfield__label", ["for"] = "lf-member__new_password1" }, 1.68 + label= _'New password', 1.69 + name = 'new_password1', 1.70 + value = "" 1.71 + } 1.72 1.73 - slot.put("<br />") 1.74 - 1.75 - ui.heading { level = 2, content = _"Enter a new password:" } 1.76 - ui.field.password{ name = "new_password1" } 1.77 + slot.put("<br />") 1.78 + 1.79 + ui.field.password{ 1.80 + container_attr = { class = "mdl-textfield mdl-js-textfield mdl-textfield--floating-label" }, 1.81 + attr = { id = "lf-member__new_password2", class = "mdl-textfield__input" }, 1.82 + label_attr = { class = "mdl-textfield__label", ["for"] = "lf-member__new_password2" }, 1.83 + label= _'Repeat new password', 1.84 + name = 'new_password2', 1.85 + value = "" 1.86 + } 1.87 1.88 - ui.heading { level = 2, content = _"Enter your new password again please:" } 1.89 - ui.field.password{ name = "new_password2" } 1.90 - 1.91 - slot.put("<br />") 1.92 + slot.put("<br />") 1.93 + 1.94 + ui.tag{ 1.95 + tag = "input", 1.96 + attr = { 1.97 + type = "submit", 1.98 + class = "mdl-button mdl-js-button mdl-button--raised mdl-button--colored", 1.99 + value = _"Save" 1.100 + }, 1.101 + content = "" 1.102 + } 1.103 + slot.put(" ") 1.104 + ui.link { 1.105 + attr = { class = "mdl-button mdl-js-button mdl-button--raised" }, 1.106 + module = "member", view = "show", id = app.session.member_id, 1.107 + content = _"Cancel" 1.108 + } 1.109 + end 1.110 + } 1.111 1.112 - ui.tag{ 1.113 - tag = "input", 1.114 - attr = { 1.115 - type = "submit", 1.116 - class = "btn btn-default", 1.117 - value = _"Save" 1.118 - }, 1.119 - content = "" 1.120 - } 1.121 - slot.put("<br /><br /><br />") 1.122 - ui.link { 1.123 - module = "member", view = "show", id = app.session.member_id, 1.124 - content = _"Cancel" 1.125 - } 1.126 - end ) 1.127 - end ) 1.128 - end 1.129 -} 1.130 \ No newline at end of file 1.131 + end } 1.132 + end } 1.133 + end } 1.134 + 1.135 + ui.cell_sidebar{ content = function() 1.136 + execute.view { 1.137 + module = "member", view = "_sidebar_whatcanido", params = { 1.138 + member = app.session.member 1.139 + } 1.140 + } 1.141 + end } 1.142 + 1.143 +end }