summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d3f7686)
raw | patch | inline | side by side (parent: d3f7686)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 29 Sep 2010 15:30:05 +0000 (15:30 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 29 Sep 2010 15:30:05 +0000 (15:30 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19858 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc | patch | blob | history | |
gosa-plugins/goto/admin/systems/goto/Config/puppet.tpl | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc b/gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc
index 52417e9858a445a4ea825022e6519f1365300ded..cc38bd09000e7cc8b69b279b3c63a11d25248ade 100644 (file)
function openEntry($action="",$target=array(),$all=array(), $altTabClass ="", $altTabType = "", $altAclCategory="")
{
- $this->setCurrentItem($target[0]);
+ $this->base = $this->currentItemValues[$target[0]]['base'];
}
$current['children'][$name] = &$this->currentItemValues[$name];
}
+
+ function saveItemChanges()
+ {
+
+ // Save eventually changed values
+ if($this->currentItem){
+ foreach($this->TemplateEngine->getWidgets() as $widget){
+ $this->currentItem['values'][$widget->getName()] = $widget->getValue();
+ }
+ }
+ $this->closeDialogs();
+ }
+
/*! \brief Selects an item as active and takes care
* of required post/get handling.
*/
function setCurrentItem($item)
{
- // Do nothing if we're already where we wanted to switch to.
- if($this->currentItemName == $item) return;
-
if(!isset($this->currentItemValues[$item])){
echo "Invalid item name {$name}! Skipping selection!";
return;
}
- // Save eventually changed values
- if($this->currentItem){
- foreach($this->TemplateEngine->getWidgets() as $widget){
- $this->currentItem['values'][$widget->getName()] = $widget->getValue();
- }
- }
-
// Set the new item info.
$this->currentItemName = $item;
$this->currentItem = &$this->currentItemValues[$item];
$this->currentItemType = $this->currentItem['type'];
$this->currentItemDescriptor =&$this->itemConfig[$this->currentItem['type']];
- $this->base = $this->currentItem['base'];
-
// Update the template engine to use another type of item and
// some other values.
$this->TemplateEngine->setValues($this->currentItemType,$this->currentItem['values']);
*/
function save_object()
{
- $this->TemplateEngine->save_object();
+ if($this->dialogObject){
+ $this->TemplateEngine->save_object();
+ }
// Add sub-module requested.
if(isset($_POST['addSubModule']) && isset($_POST['subModule'])){
}
$name = 'test'.rand(0,99999);
$this->addItem($sub,$name,$values);
- $this->setCurrentItem($name);
}
}
// Get selected Items
$this->itemContainerSelector->update();
$this->base = $this->itemContainerSelector->getBase();
- $itemName = "";
- foreach($this->currentItemValues as $item){
- if($item['base'] == $this->base){
- $this->setCurrentItem($item['name']);
- break;
- }
- }
-
}
/*! \brief Forward plugin acls
diff --git a/gosa-plugins/goto/admin/systems/goto/Config/puppet.tpl b/gosa-plugins/goto/admin/systems/goto/Config/puppet.tpl
index b35cd385aa15b28d487c97d9a095c4dd6c6782ed..067afd91affd081858b50b4b4fdc38116c3d6369 100644 (file)
<td>{$data}</td>
</tr>
</table>
+ <input type='submit'>
{/if}