liquid_feedback_frontend
annotate app/main/admin/_action/member_deactivate.lua @ 1138:e4df22c3a69f
Bugfix: Allow choosing a delegatee during voting phase
| author | bsw |
|---|---|
| date | Fri Mar 20 22:35:16 2015 +0100 (2015-03-20) |
| 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 ) |