liquid_feedback_frontend
annotate app/main/admin/_action/member_deactivate.lua @ 1188:17b1456d0262
Added pmake/bmake to list of Debian packages for installation
| author | jbe | 
|---|---|
| date | Sun Mar 29 20:17:54 2015 +0200 (2015-03-29) | 
| parents | 5b6082e9bd5c | 
| children | 
| rev | line source | 
|---|---|
| bsw@1090 | 1 local sure = param.get("sure") | 
| bsw@1090 | 2 | 
| bsw@1090 | 3 if sure ~= "yes" then | 
| bsw@1090 | 4 slot.select("error", function() | 
| bsw@1090 | 5 ui.tag{ content = _"You need to confirm to deactivate!" } | 
| bsw@1090 | 6 end) | 
| bsw@1090 | 7 return false | 
| bsw@1090 | 8 end | 
| bsw@1090 | 9 | 
| bsw@1090 | 10 local id = param.get_id() | 
| bsw@1090 | 11 local clean = param.get("clean") | 
| bsw@1090 | 12 | 
| bsw@1090 | 13 local member = Member:by_id(id) | 
| bsw@1090 | 14 | 
| bsw@1090 | 15 member:delete() | 
| bsw@1090 | 16 | 
| bsw@1090 | 17 slot.select("notice", function() | 
| bsw@1090 | 18 ui.tag{ content = _"Member successfully deactivated" } | 
| bsw@1090 | 19 end ) |