# HG changeset patch # User bsw # Date 1340292145 -7200 # Node ID ae7649ddccf4e12564083972c27a17040d63640c # Parent c5878a5d7dc755e4b785d7a8f6d83306ebfb8e63 Make it possible to set an member inactive, display activation status and lock status seperately in admin member list diff -r c5878a5d7dc7 -r ae7649ddccf4 app/main/admin/_action/member_update.lua --- a/app/main/admin/_action/member_update.lua Thu Jun 21 17:15:37 2012 +0200 +++ b/app/main/admin/_action/member_update.lua Thu Jun 21 17:22:25 2012 +0200 @@ -8,6 +8,10 @@ if locked ~= nil then member.locked = locked end +local deactivate = param.get("deactivate", atom.boolean) +if deactivate then + member.active = false +end local login = param.get("login") if login then member.login = login diff -r c5878a5d7dc7 -r ae7649ddccf4 app/main/admin/member_edit.lua --- a/app/main/admin/member_edit.lua Thu Jun 21 17:15:37 2012 +0200 +++ b/app/main/admin/member_edit.lua Thu Jun 21 17:22:25 2012 +0200 @@ -60,6 +60,11 @@ ui.field.boolean{ label = _"Lock member?", name = "locked" } end + ui.field.boolean{ + label = _"Member inactive?", name = "deactivate", + readonly = not member.active, value = member.active == false + } + slot.put("
") ui.submit{ text = _"Save" } end diff -r c5878a5d7dc7 -r ae7649ddccf4 app/main/admin/member_list.lua --- a/app/main/admin/member_list.lua Thu Jun 21 17:15:37 2012 +0200 +++ b/app/main/admin/member_list.lua Thu Jun 21 17:22:25 2012 +0200 @@ -67,9 +67,7 @@ }, { content = function(record) - if record.locked then - ui.field.text{ value = "locked" } - elseif not record.activated then + if not record.activated then ui.field.text{ value = "not activated" } elseif not record.active then ui.field.text{ value = "inactive" } @@ -80,6 +78,13 @@ }, { content = function(record) + if record.locked then + ui.field.text{ value = "locked" } + end + end + }, + { + content = function(record) ui.link{ attr = { class = "action admin_only" }, text = _"Edit",