mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 01:43:47 +01:00
allow site config templates to loop / reload to enable/disable rows
This commit is contained in:
parent
57d5176080
commit
4702d51e21
@ -263,6 +263,13 @@ class admin_config
|
||||
'newsettings' => array(),
|
||||
);
|
||||
|
||||
// $app.config is looping eg. <select onchange="1"
|
||||
if (!empty($_content['newsettings']) && empty($_content['save']) && empty($_content['apply']))
|
||||
{
|
||||
$content['newsettings'] = $_content['newsettings'];
|
||||
}
|
||||
else
|
||||
{
|
||||
// for security reasons we do not send all config to client-side, but only ones mentioned in templates
|
||||
$matches = null;
|
||||
preg_match_all('/id="newsettings\[([^]]+)\]/', file_get_contents($path), $matches, PREG_PATTERN_ORDER);
|
||||
@ -270,6 +277,7 @@ class admin_config
|
||||
{
|
||||
$content['newsettings'][$name] = isset($config[$name]) ? $config[$name] : '';
|
||||
}
|
||||
}
|
||||
|
||||
// make everything readonly and remove save/apply button, if user has not rights to store config
|
||||
if ($GLOBALS['egw']->acl->check('site_config_acce',2,'admin'))
|
||||
|
Loading…
Reference in New Issue
Block a user