summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 871da94)
raw | patch | inline | side by side (parent: 871da94)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 7 Oct 2010 08:16:14 +0000 (08:16 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 7 Oct 2010 08:16:14 +0000 (08:16 +0000) |
-The Recipe-tab adds the fai/puppets tabs now on demand.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19931 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19931 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc b/gosa-plugins/goto/admin/systems/goto/Device/class_InstallRecipe.inc
index aca7d011437a3642f8458a8bfed376234437c30e..a4a33226138e65abac613a58d795214d00148056 100644 (file)
function save_object()
{
+
+
if(isset($_POST['InstallRecipePosted'])){
+
+ $currentInstallMethod = $this->kickstartConfigManagement;
plugin::save_object();
$this->kickstartRootEnabled = isset($_POST['kickstartRootEnabled']);
$this->kickstartTimeUTC = isset($_POST['kickstartTimeUTC']);
}
}
$this->kickstartNTPServerList->setListData($this->kickstartNTPServer);
+
+ if($currentInstallMethod != $this->kickstartConfigManagement){
+ $this->updateRecipeTab();
+ }
}
if(isset($_POST['cancelPassword'])) $this->setKickstartRootPasswordHash =false;
if(isset($_POST['setPassword'])) {
$this->kickstartRootPasswordHash = @$test->generate_hash(get_post('rootPassword'));
}
- $this->updateRecipeTab();
}
if(!isset($this->recipeTabs[$mode])){
$this->recipeTabs[$mode] = new DeviceConfig($this->config, $this->dn);
$this->recipeTabs[$mode]->parent = &$this->parent;
+
+ if($this->recipeTabs[$mode]->setInstallMethod($mode)){
+
+ $class= &$this->recipeTabs[$mode];
+
+ // Add some dummy entries for testing.
+ if($mode == 'puppet'){
+ $id = $class->addItem('PuppetModule','test1',
+ array(
+ 'dependency' => array('stulle','Wurst'),
+ 'version' => '2.4-f',
+ 'name' => 'Thundebird',
+ 'description' => 'Mozilla mail client')
+ );
+ $id = $class->addItem('PuppetModule','test2',
+ array(
+ 'dependency' => array('Leipnitz','Dose'),
+ 'version' => 1,
+ 'name' => 'Firefox',
+ 'description' => 'Test Module')
+ );
+ $class->setCurrentItem($id);
+ $id = $class->addItem('PuppetTemplate','temp1',
+ array(
+ 'name' => 'temp1',
+ 'data' => 'kekse.tpl')
+ );
+ $class->setCurrentItem($id);
+ $id = $class->addItem('PuppetTemplate','tep1',
+ array(
+ 'name' => 'tep1',
+ 'data' => 'kekse.tpl')
+ );
+
+ $class->setCurrentItem($class->getRootItemID());
+ }
+ }else{
+ unset($this->recipeTabs[$mode]);
+ }
}
// Update the recipe tab to match the selected installation method.
- if($this->is_account){
+ if($this->is_account && isset($this->recipeTabs[$mode])){
if(isset($this->parent->by_object['DeviceConfig']) &&
- $this->recipeTabs[$mode] === $this->parent->by_object['DeviceConfig']){
+ $this->recipeTabs[$mode] === $this->parent->by_object['DeviceConfig']){
return;
}