From: hickert Date: Thu, 14 Apr 2011 07:26:39 +0000 (+0000) Subject: Updated item handling X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c79feb6ae9a3c1c32200d7c92ec23732c43fd424;p=gosa.git Updated item handling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20727 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc index 3b9ccb04d..58afd625c 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc @@ -497,18 +497,17 @@ class newConfigManagement extends plugin { // We've to add a config item $this->TemplateEngine->load($this->itemConfig); - if(isset($this->cfgItemMap[$type])){ + if($this->cfgItemMap[$item['type']] != 'root'){ $method = $this->cfgItemMap[$type]; $this->TemplateEngine->setTemplate($method.".tpl"); $this->TemplateEngine->setValues($type,array()); $this->listing->setDialogObject($this->TemplateEngine); $this->currentObject = NULL; - }elseif($type == 'Distribution'){ + }else{ $this->TemplateEngine->setTemplate("root.tpl"); $this->TemplateEngine->setValues($type,array()); $this->listing->setDialogObject($this->TemplateEngine); $this->currentObject = NULL; - }elseif($type == 'Release'){ } } @@ -550,6 +549,12 @@ class newConfigManagement extends plugin function saveItemChanges() { $item = $this->currentObject; + $type = $this->TemplateEngine->getItemType(); + if($this->cfgItemMap[$item['type']] == 'root'){ + echo "{$type} Cannot be saved yet"; + $this->listing->clearDialogObject(); + return; + } // Null means a new object has to be added. if($item == NULL){ @@ -557,7 +562,6 @@ class newConfigManagement extends plugin // Save template engine modifications $this->TemplateEngine->save_object(); $release = preg_replace("/^.*\//","", $this->getReleasePath($this->selectedContainer)); - $type = $this->TemplateEngine->getItemType(); // Collect modified values $values = array();