mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-29 03:13:40 +01:00
* Api: Fix missing translations in ACL dialog
This commit is contained in:
parent
6283b9013b
commit
7462bd0177
@ -436,6 +436,7 @@ class admin_acl
|
||||
($GLOBALS['egw_info']['flags']['currentapp'] != 'admin' ? 'other' :
|
||||
$GLOBALS['egw_info']['user']['preferences']['admin']['acl_filter']),
|
||||
'filter2' => !empty($_GET['acl_app']) ? $_GET['acl_app'] : '',
|
||||
'filter2_onchange' => 'app.admin.acl_app_change',
|
||||
'lettersearch' => false,
|
||||
'order' => 'acl_appname',
|
||||
'sort' => 'ASC',
|
||||
|
@ -637,6 +637,10 @@ class AdminApp extends EgwApp
|
||||
// Load checkboxes & their values
|
||||
content.acl_rights = content.acl_rights ? parseInt(content.acl_rights) : null;
|
||||
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])
|
||||
{
|
||||
// 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.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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user