mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-17 20:11:23 +02:00
* Api: Fix missing translations in ACL dialog
This commit is contained in:
@@ -436,6 +436,7 @@ class admin_acl
|
|||||||
($GLOBALS['egw_info']['flags']['currentapp'] != 'admin' ? 'other' :
|
($GLOBALS['egw_info']['flags']['currentapp'] != 'admin' ? 'other' :
|
||||||
$GLOBALS['egw_info']['user']['preferences']['admin']['acl_filter']),
|
$GLOBALS['egw_info']['user']['preferences']['admin']['acl_filter']),
|
||||||
'filter2' => !empty($_GET['acl_app']) ? $_GET['acl_app'] : '',
|
'filter2' => !empty($_GET['acl_app']) ? $_GET['acl_app'] : '',
|
||||||
|
'filter2_onchange' => 'app.admin.acl_app_change',
|
||||||
'lettersearch' => false,
|
'lettersearch' => false,
|
||||||
'order' => 'acl_appname',
|
'order' => 'acl_appname',
|
||||||
'sort' => 'ASC',
|
'sort' => 'ASC',
|
||||||
|
@@ -637,6 +637,10 @@ class AdminApp extends EgwApp
|
|||||||
// Load checkboxes & their values
|
// Load checkboxes & their values
|
||||||
content.acl_rights = content.acl_rights ? parseInt(content.acl_rights) : null;
|
content.acl_rights = content.acl_rights ? parseInt(content.acl_rights) : null;
|
||||||
jQuery.extend(content, {acl:[],right:[],label:[]});
|
jQuery.extend(content, {acl:[],right:[],label:[]});
|
||||||
|
|
||||||
|
// Use this to make sure we get correct app translations
|
||||||
|
let app_egw = egw(content.acl_appname, window);
|
||||||
|
|
||||||
for( var right in acl_rights[content.acl_appname])
|
for( var right in acl_rights[content.acl_appname])
|
||||||
{
|
{
|
||||||
// only user himself is allowed to grant private (16) rights
|
// only user himself is allowed to grant private (16) rights
|
||||||
@@ -646,7 +650,7 @@ class AdminApp extends EgwApp
|
|||||||
}
|
}
|
||||||
content.acl.push(content.acl_rights & parseInt(right));
|
content.acl.push(content.acl_rights & parseInt(right));
|
||||||
content.right.push(right);
|
content.right.push(right);
|
||||||
content.label.push(egw.lang(acl_rights[content.acl_appname][right]));
|
content.label.push(app_egw.lang(acl_rights[content.acl_appname][right]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -779,6 +783,20 @@ class AdminApp extends EgwApp
|
|||||||
this._acl_dialog(content);
|
this._acl_dialog(content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load the new application's lang files when the app filter is changed
|
||||||
|
*/
|
||||||
|
acl_app_change(event, nm)
|
||||||
|
{
|
||||||
|
let appname = nm.getWidgetById('filter2').getValue() || '';
|
||||||
|
if(appname)
|
||||||
|
{
|
||||||
|
let app_egw = egw(appname);
|
||||||
|
app_egw.langRequireApp(window, appname);
|
||||||
|
nm.getRoot().setApiInstance(app_egw);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback called on successfull call of serverside ACL handling
|
* Callback called on successfull call of serverside ACL handling
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user