From: hickert Date: Tue, 4 May 2010 16:02:26 +0000 (+0000) Subject: Updated property editor X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a0453fa1204e4835fced48f76918cce207c80b66;p=gosa.git Updated property editor git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18053 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/addons/configViewer/class_configViewer.inc b/gosa-core/plugins/addons/configViewer/class_configViewer.inc index 687da8877..343f03845 100644 --- a/gosa-core/plugins/addons/configViewer/class_configViewer.inc +++ b/gosa-core/plugins/addons/configViewer/class_configViewer.inc @@ -39,15 +39,20 @@ class configViewer extends management */ function execute() { - foreach($_POST as $pName => $value){ - if(preg_match("/:/", $pName)){ - list($class,$name) = preg_split("/:/", $pName,2); - if($this->config->configRegistry->propertyExists($class,$name)){ - $prop = $this->config->configRegistry->getProperty($class,$name); - $prop->setValue(get_post($pName));; - } + // Walk trough all properties and check if there posts for us. + $all = $this->config->configRegistry->getAllProperties(); + $modified = FALSE; + foreach($all as $prop){ + $post = "{$prop->getClass()}:{$prop->getName()}"; + if(isset($_POST[$post])){ + $prop->setValue(get_post($post));; } + + $modified |= in_array($prop->getStatus(),array('modified','removed')); } + + $smarty = get_smarty(); + $smarty->assign('is_modified', $modified); return(management::execute()); } diff --git a/gosa-core/plugins/addons/configViewer/generic.tpl b/gosa-core/plugins/addons/configViewer/generic.tpl index 1893271ab..d02577fb7 100644 --- a/gosa-core/plugins/addons/configViewer/generic.tpl +++ b/gosa-core/plugins/addons/configViewer/generic.tpl @@ -19,7 +19,9 @@ - +{if !$is_modified} + +{/if} {$content} diff --git a/gosa-core/plugins/addons/configViewer/property-list.tpl b/gosa-core/plugins/addons/configViewer/property-list.tpl index 082f5dea6..785129092 100644 --- a/gosa-core/plugins/addons/configViewer/property-list.tpl +++ b/gosa-core/plugins/addons/configViewer/property-list.tpl @@ -15,6 +15,10 @@ {$LIST} +{if !$is_modified} + +{/if} +