diff --git a/admin/inc/class.admin_acl.inc.php b/admin/inc/class.admin_acl.inc.php index 0e2a025387..8c2819360b 100644 --- a/admin/inc/class.admin_acl.inc.php +++ b/admin/inc/class.admin_acl.inc.php @@ -481,7 +481,6 @@ class admin_acl 'onExecute' => 'javaScript:app.admin.acl', ), 'delete' => array( - 'confirm' => 'Delete this access control', 'caption' => 'Delete', 'disableClass' => 'rowNoEdit', 'onExecute' => 'javaScript:app.admin.acl', diff --git a/admin/js/app.js b/admin/js/app.js index b7635e3825..3aa060d8c6 100644 --- a/admin/js/app.js +++ b/admin/js/app.js @@ -481,11 +481,7 @@ app.classes.admin = AppJS.extend( switch(_action.id) { case 'delete': - var app = egw.app_name(); // can be either admin or preferences! - if (app != 'admin') app = 'preferences'; - var className = app+'_acl'; - var request = egw.json(className+'::ajax_change_acl', [ids], this._acl_callback,this,false,this) - .sendRequest(); + this._acl_delete(ids); break; case 'add': @@ -499,6 +495,50 @@ app.classes.admin = AppJS.extend( } }, + _acl_delete: function(ids) + { + var app = egw.app_name(); // can be either admin or preferences! + if (app != 'admin') app = 'preferences'; + var className = app+'_acl'; + var callback = function(_button_id, _value) { + if(_button_id != et2_dialog.OK_BUTTON) return; + + var request = egw.json(className+'::ajax_change_acl', [ids,null,_value], this._acl_callback,this,false,this) + .sendRequest(); + }.bind(this); + + var modifications = {}; + var dialog_options = { + callback: callback, + title: this.egw.lang('Delete'), + buttons: et2_dialog.BUTTONS_OK_CANCEL, + value: { + content: {}, + sel_options: {}, + modifications: modifications, + readonlys: {} + }, + template: egw.webserverUrl+'/admin/templates/default/acl.delete.xet' + }; + + // Handle policy documentation tab here + if(this.egw.user('apps').policy) + { + dialog_options['width'] = 550; + dialog_options['height'] = 350, + modifications.tabs = { + add_tabs: true, + tabs: [{ + label: egw.lang('Documentation'), + template: 'policy.admin_cmd', + prepend: false + }] + }; + } + // Create the dialog + this.acl_dialog = et2_createWidget("dialog", dialog_options, et2_dialog._create_parent(app)); + }, + /** * Create the ACL edit dialog, including defaults & fetching what can be found * diff --git a/admin/templates/default/acl.delete.xet b/admin/templates/default/acl.delete.xet new file mode 100644 index 0000000000..de6a0257f3 --- /dev/null +++ b/admin/templates/default/acl.delete.xet @@ -0,0 +1,18 @@ + + + + + +