liquid_feedback_frontend

changeset 590:ae7649ddccf4

Make it possible to set an member inactive, display activation status and lock status seperately in admin member list
author bsw
date Thu Jun 21 17:22:25 2012 +0200 (2012-06-21)
parents c5878a5d7dc7
children ce8cba9d88bb
files app/main/admin/_action/member_update.lua app/main/admin/member_edit.lua app/main/admin/member_list.lua
line diff
     1.1 --- a/app/main/admin/_action/member_update.lua	Thu Jun 21 17:15:37 2012 +0200
     1.2 +++ b/app/main/admin/_action/member_update.lua	Thu Jun 21 17:22:25 2012 +0200
     1.3 @@ -8,6 +8,10 @@
     1.4  if locked ~= nil then
     1.5    member.locked = locked
     1.6  end
     1.7 +local deactivate = param.get("deactivate", atom.boolean)
     1.8 +if deactivate then
     1.9 +  member.active = false
    1.10 +end
    1.11  local login = param.get("login")
    1.12  if login then
    1.13    member.login = login
     2.1 --- a/app/main/admin/member_edit.lua	Thu Jun 21 17:15:37 2012 +0200
     2.2 +++ b/app/main/admin/member_edit.lua	Thu Jun 21 17:22:25 2012 +0200
     2.3 @@ -60,6 +60,11 @@
     2.4        ui.field.boolean{  label = _"Lock member?",       name = "locked" }
     2.5      end
     2.6      
     2.7 +    ui.field.boolean{ 
     2.8 +      label = _"Member inactive?", name = "deactivate",
     2.9 +      readonly = not member.active, value = member.active == false
    2.10 +    }
    2.11 +    
    2.12      slot.put("<br />")
    2.13      ui.submit{         text  = _"Save" }
    2.14    end
     3.1 --- a/app/main/admin/member_list.lua	Thu Jun 21 17:15:37 2012 +0200
     3.2 +++ b/app/main/admin/member_list.lua	Thu Jun 21 17:22:25 2012 +0200
     3.3 @@ -67,9 +67,7 @@
     3.4          },
     3.5          {
     3.6            content = function(record)
     3.7 -            if record.locked then
     3.8 -              ui.field.text{ value = "locked" }
     3.9 -            elseif not record.activated then
    3.10 +            if not record.activated then
    3.11                ui.field.text{ value = "not activated" }
    3.12              elseif not record.active then
    3.13                ui.field.text{ value = "inactive" }
    3.14 @@ -80,6 +78,13 @@
    3.15          },
    3.16          {
    3.17            content = function(record)
    3.18 +            if record.locked then
    3.19 +              ui.field.text{ value = "locked" }
    3.20 +            end
    3.21 +          end
    3.22 +        },
    3.23 +        {
    3.24 +          content = function(record)
    3.25              ui.link{
    3.26                attr = { class = "action admin_only" },
    3.27                text = _"Edit",

Impressum / About Us