liquid_feedback_frontend
annotate app/main/admin/_action/member_deactivate.lua @ 1641:ab837b075cf7
Fixed mldap_get_named_number_arg to not leave any element on the Lua stack (should not have had any effect anyway but is now consistent to documentation)
| author | jbe |
|---|---|
| date | Tue Feb 09 17:44:47 2021 +0100 (2021-02-09) |
| 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 ) |