liquid_feedback_frontend

diff app/main/member/edit_avatar.lua @ 0:3bfb2fcf7ab9

Version alpha1
author bsw/jbe
date Wed Nov 18 12:00:00 2009 +0100 (2009-11-18)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/app/main/member/edit_avatar.lua	Wed Nov 18 12:00:00 2009 +0100
     1.3 @@ -0,0 +1,33 @@
     1.4 +slot.put_into("title", _"Upload avatar")
     1.5 +
     1.6 +slot.select("actions", function()
     1.7 +  ui.link{
     1.8 +    content = function()
     1.9 +        ui.image{ static = "icons/16/cancel.png" }
    1.10 +        slot.put(_"Cancel")
    1.11 +    end,
    1.12 +    module = "index",
    1.13 +    view = "index"
    1.14 +  }
    1.15 +end)
    1.16 +
    1.17 +ui.form{
    1.18 +  record = app.session.member,
    1.19 +  attr = { 
    1.20 +    class = "vertical",
    1.21 +    enctype = 'multipart/form-data'
    1.22 +  },
    1.23 +  module = "member",
    1.24 +  action = "update_avatar",
    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.image{ field_name = "avatar", label = _"Avatar" }
    1.34 +    ui.submit{ value = _"Save" }
    1.35 +  end
    1.36 +}
    1.37 \ No newline at end of file

Impressum / About Us