summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bc8b000)
raw | patch | inline | side by side (parent: bc8b000)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 19 Apr 2011 09:34:33 +0000 (09:34 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 19 Apr 2011 09:34:33 +0000 (09:34 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20742 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/TemplateEngine.tpl b/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/TemplateEngine.tpl
index 8767de994912c1fcf7b552bbcbe6955d602b2b0c..9372b25ebfef879bee9e939764289d7041565e0d 100644 (file)
-<h3>Module name</h3>
+<h3>{$typeData.description}</h3>
+
+<hr>
{$template}
diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateEngine.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateEngine.inc
index f5eb611b4c08c308deee07a8d30aea16b8889fe6..fd9617c609bcec2b2b29c84e6f72caaaaf84c4be 100644 (file)
{
$smarty = get_smarty();
$smarty->assign("type", $this->itemType);
+ $smarty->assign("typeData", $this->data[$this->itemType]);
// Tell smarty the HTML-content for each widget and the name that should be
// displayed.
diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/class_newConfigManagement.inc
index 2c0383e334c5535d1be6f46b3ea44ac70a401383..5cf92797aa2d205f411d439699886eb8139e6c97 100644 (file)
$item = $this->currentObject;
$type = $this->TemplateEngine->getItemType();
if($this->cfgItemMap[$type] == 'root'){
- echo "{$type} Cannot be saved yet";
- $this->listing->clearDialogObject();
- return;
+
+ // We've to create a new distribution
+ if($type == 'Distribution'){
+ $name = $values['name'];
+ $itype = $values['installation_type'];
+ $imethod = $values['installation_method'];
+ $mirror = $values['mirror'];
+
+ $rpc = $this->config->getRpcHandle();
+ $res = $rpc->createDistribution($name, $itype, array('mirror'=>$mirror, 'install_method' => $imethod));
+
+ print_a(array($name, $itype, array('mirror'=>$mirror, 'install_method' => $imethod)));
+
+ if(!$rpc->success()){
+ msg_dialog::display(_("Error"), sprintf(_("Failed to save distributions: %s"), $rpc->get_error()),ERROR_DIALOG);
+ return(NULL);
+ }else{
+
+ // We've successfully added the item, now add it to the tree.
+ $this->dataModel->addItem($type, $this->selectedContainer, $values['name'],array(), '-' );
+
+ // Finally - close the dialog.
+ $this->listing->clearDialogObject();
+ }
+
+
+ $this->listing->clearDialogObject();
+
+ }else{
+
+ echo "{$type} Cannot be saved yet";
+ $this->listing->clearDialogObject();
+ return;
+ }
}
// Save a CONFIG-ITEM object.