liquid_feedback_frontend

diff app/main/member/settings.lua @ 9:0ee1e0c42d4c

Version beta5

Minor security fix: Added missing security filter for admin section. Reading of member listing including login names was possible for all users. Write access has not been possible though.

Changing of name and login is possible while a history of these changes is written and accessible by all users.

Statistics shown in area list

Trimming of user input also converts multiple whitespaces to single space character.
author bsw
date Mon Jan 04 12:00:00 2010 +0100 (2010-01-04)
parents
children 72c5e0ee7c98
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/app/main/member/settings.lua	Mon Jan 04 12:00:00 2010 +0100
     1.3 @@ -0,0 +1,75 @@
     1.4 +
     1.5 +slot.put_into("title", _"Settings")
     1.6 +
     1.7 +slot.select("actions", function()
     1.8 +  ui.link{
     1.9 +    content = function()
    1.10 +        ui.image{ static = "icons/16/cancel.png" }
    1.11 +        slot.put(_"Cancel")
    1.12 +    end,
    1.13 +    module = "index",
    1.14 +    view = "index"
    1.15 +  }
    1.16 +end)
    1.17 +
    1.18 +ui.heading{ content = _"Change your name" }
    1.19 +util.help("member.settings.name", _"Change name")
    1.20 +
    1.21 +ui.form{
    1.22 +  attr = { class = "vertical" },
    1.23 +  module = "member",
    1.24 +  action = "update_name",
    1.25 +  routing = {
    1.26 +    ok = {
    1.27 +      mode = "redirect",
    1.28 +      module = "index",
    1.29 +      view = "index"
    1.30 +    }
    1.31 +  },
    1.32 +  content = function()
    1.33 +    ui.field.text{ label = _"Name", name = "name", value = app.session.member.name }
    1.34 +    ui.submit{ value = _"Change name" }
    1.35 +  end
    1.36 +}
    1.37 +
    1.38 +ui.heading{ content = _"Change your login" }
    1.39 +util.help("member.settings.login", _"Change login")
    1.40 +
    1.41 +ui.form{
    1.42 +  attr = { class = "vertical" },
    1.43 +  module = "member",
    1.44 +  action = "update_login",
    1.45 +  routing = {
    1.46 +    ok = {
    1.47 +      mode = "redirect",
    1.48 +      module = "index",
    1.49 +      view = "index"
    1.50 +    }
    1.51 +  },
    1.52 +  content = function()
    1.53 +    ui.field.text{ label = _"Login", name = "login", value = app.session.member.login }
    1.54 +    ui.submit{ value = _"Change login" }
    1.55 +  end
    1.56 +}
    1.57 +
    1.58 +ui.heading{ content = _"Change your password" }
    1.59 +util.help("member.settings.password", _"Change password")
    1.60 +
    1.61 +ui.form{
    1.62 +  attr = { class = "vertical" },
    1.63 +  module = "member",
    1.64 +  action = "update_password",
    1.65 +  routing = {
    1.66 +    ok = {
    1.67 +      mode = "redirect",
    1.68 +      module = "index",
    1.69 +      view = "index"
    1.70 +    }
    1.71 +  },
    1.72 +  content = function()
    1.73 +    ui.field.password{ label = _"Old password", name = "old_password" }
    1.74 +    ui.field.password{ label = _"New password", name = "new_password1" }
    1.75 +    ui.field.password{ label = _"Repeat new password", name = "new_password2" }
    1.76 +    ui.submit{ value = _"Change password" }
    1.77 +  end
    1.78 +}

Impressum / About Us