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