mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
Add documentation tab to deleting ACL
This commit is contained in:
parent
a0a1326e6f
commit
7915bfd5b2
@ -481,7 +481,6 @@ class admin_acl
|
|||||||
'onExecute' => 'javaScript:app.admin.acl',
|
'onExecute' => 'javaScript:app.admin.acl',
|
||||||
),
|
),
|
||||||
'delete' => array(
|
'delete' => array(
|
||||||
'confirm' => 'Delete this access control',
|
|
||||||
'caption' => 'Delete',
|
'caption' => 'Delete',
|
||||||
'disableClass' => 'rowNoEdit',
|
'disableClass' => 'rowNoEdit',
|
||||||
'onExecute' => 'javaScript:app.admin.acl',
|
'onExecute' => 'javaScript:app.admin.acl',
|
||||||
|
@ -481,11 +481,7 @@ app.classes.admin = AppJS.extend(
|
|||||||
switch(_action.id)
|
switch(_action.id)
|
||||||
{
|
{
|
||||||
case 'delete':
|
case 'delete':
|
||||||
var app = egw.app_name(); // can be either admin or preferences!
|
this._acl_delete(ids);
|
||||||
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();
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'add':
|
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
|
* Create the ACL edit dialog, including defaults & fetching what can be found
|
||||||
*
|
*
|
||||||
|
18
admin/templates/default/acl.delete.xet
Normal file
18
admin/templates/default/acl.delete.xet
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE overlay PUBLIC "-//EGroupware GmbH//eTemplate 2//EN" "http://www.egroupware.org/etemplate2.dtd">
|
||||||
|
<!-- $Id$ -->
|
||||||
|
<overlay>
|
||||||
|
<template id="admin.acl.delete.main" template="" lang="" group="0" version="1.9.001">
|
||||||
|
<description value="Delete this access control"/>
|
||||||
|
</template>
|
||||||
|
<template id="admin.acl.delete" template="" lang="" group="0" version="1.9.001">
|
||||||
|
<tabbox id="tabs" class="et2_nowrap" span="all" width="100%" tab_height="250px">
|
||||||
|
<tabs>
|
||||||
|
<tab id="main" label="Delete" statustext="Delete"/>
|
||||||
|
</tabs>
|
||||||
|
<tabpanels>
|
||||||
|
<template id="admin.acl.delete.main"/>
|
||||||
|
</tabpanels>
|
||||||
|
</tabbox>
|
||||||
|
</template>
|
||||||
|
</overlay>
|
Loading…
Reference in New Issue
Block a user