diff --git a/admin/inc/class.admin_account.inc.php b/admin/inc/class.admin_account.inc.php index aef6d21445..2ce2bb784d 100644 --- a/admin/inc/class.admin_account.inc.php +++ b/admin/inc/class.admin_account.inc.php @@ -293,10 +293,11 @@ class admin_account * Delete a group via ajax * * @param int $account_id + * @param String[] $data Optional data */ - public static function ajax_delete_group($account_id) + public static function ajax_delete_group($account_id, $data) { - $cmd = new admin_cmd_delete_account(Api\Accounts::id2name(Api\Accounts::id2name($account_id)), null, false); + $cmd = new admin_cmd_delete_account(Api\Accounts::id2name(Api\Accounts::id2name($account_id)), null, false, $data['admin_cmd']); $msg = $cmd->run(); Api\Json\Response::get()->call('egw.refresh', $msg, 'admin', $account_id, 'delete'); diff --git a/admin/js/app.js b/admin/js/app.js index 3e9a977f3b..4695dc05f6 100644 --- a/admin/js/app.js +++ b/admin/js/app.js @@ -443,12 +443,8 @@ app.classes.admin = AppJS.extend( break; case 'delete': - if (!this.egw.app('policy')) - { - this.egw.json('admin_account::ajax_delete_group', [account_id]).sendRequest(); - break; - } - // fall through to open popup for policy + this.egw.json('admin_account::ajax_delete_group', [account_id, _action.data]).sendRequest(); + break; default: if (!_action.data.url) {