summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7aa0956)
raw | patch | inline | side by side (parent: 7aa0956)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 27 Sep 2010 09:56:29 +0000 (09:56 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 27 Sep 2010 09:56:29 +0000 (09:56 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19796 594d385d-05f5-0310-b6e9-bd551577e9d8
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 53f917db2afdb2e311f815c4eefa8c393836ee9a..48ef8f719a20361156d0cbdabc550f1ee76e4451 100644 (file)
$this->setCurrentItem('root');
$this->addItem('PuppetModule','test1',
array(
- 'dependency' => 'mozilla-2',
+ 'dependency' => array('mozilla-2','toaster-2.0'),
'version' => '2.4-f',
'name' => 'Thundebird',
'description' => 'Mozilla mail client')
diff --git a/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateEngine.inc b/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateEngine.inc
index 7abe3d6cd2f52680cb3e8045cd68bce016da8839..8060ed3ece4f33bb2f51265d8b1c140eb96d6523 100644 (file)
private $template = "";
private $itemType = '';
+ private $widgets = array();
function __construct($config)
{
function setValues($values)
{
foreach($values as $name => $value){
+ if(!isset($this->widgets[$name])){
+ $class = get_class();
+ echo "Unknown option '{$name}' for {$class}!)}<br>";
+ continue;
+ }
$this->widgets[$name]->setValue($value);
}
}
$this->widgets = array();
if(!isset($this->data[$this->itemType])){
- trigger_error("Undefined item type '{$name}'!");
+ echo "Undefined item type '{$name}'!<br>";
return;
}
$data = $this->data[$this->itemType];
diff --git a/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget.inc b/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget.inc
index 8216ce774d672a930f65ec939adba46603b43aee..0f92ffb185d59f0a531b8ef341c057cfc096a09b 100644 (file)
class TemplateWidget
{
- private $name = "unnamed";
- private $value = "";
+ protected $name = "unnamed";
+ protected $value = "";
- private $description = "";
- private $required = "";
- private $type = "";
- private $display = "";
+ protected $description = "";
+ protected $required = "";
+ protected $type = "";
+ protected $display = "";
function __construct(&$config, $name, $value, $description,$required,$type,$display)
{
diff --git a/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget_list.inc b/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget_list.inc
--- /dev/null
@@ -0,0 +1,17 @@
+<?php
+
+class TemplateWidget_list extends TemplateWidget
+{
+ function render()
+ {
+ $str = "";
+ foreach($this->value as $id => $val){
+ $str.= "{$val}, ";
+ }
+ return($str);
+ }
+
+}
+
+
+?>