Change delete group handler to accept documentation data

This commit is contained in:
nathangray 2019-05-28 09:59:55 -06:00
parent 5f58e4a23c
commit ffa1102687
2 changed files with 5 additions and 8 deletions

View File

@ -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');

View File

@ -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();
this.egw.json('admin_account::ajax_delete_group', [account_id, _action.data]).sendRequest();
break;
}
// fall through to open popup for policy
default:
if (!_action.data.url)
{