summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a804477)
raw | patch | inline | side by side (parent: a804477)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 1 Oct 2010 15:21:17 +0000 (15:21 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 1 Oct 2010 15:21:17 +0000 (15:21 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19889 594d385d-05f5-0310-b6e9-bd551577e9d8
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 3c3bc88d90b13f87247dcc31d81dc4f840d65040..577079f2900e74385b019d679d3c995a55639889 100644 (file)
// Prepare the value for the widget
$value = $values[$name];
$syntax = (isset($item['syntax']))? $item['syntax']: "";
+ $providedValues = (isset($item['values']))? $item['values']: array();
// Create the new widget.
$this->widgets[$name] = new $widgetClassName($this->config, $name,
$syntax,
$item['required'],
$item['type'],
- $item['display']);
+ $item['display'],
+ $providedValues);
}
}
}
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 0bbfd171ad581b2e24231b30b3695ac6878768e5..45f4fae0317ee86d6984c9513e5a5f084bc069a9 100644 (file)
protected $type = "";
protected $display = "";
protected $syntax = "";
+ protected $values = "";
/*! \brief Constructs the template widget and sets the default values.
* @param Config The GOsa configuration object.
* @param String The widget type.
* @param String A display name for the widget.
*/
- function __construct(&$config, $name, $value, $description,$syntax,$required,$type,$display)
+ function __construct(&$config, $name, $value, $description,$syntax,$required,$type,$display, $values=array())
{
$this->config = &$config;
$this->name = $name;
$this->required = $required;
$this->type = $type;
$this->syntax = $syntax;
+ $this->values = $values;
$this->display = $display;
$class = get_class();
$this->postName = "{$class}_{$this->name}";
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
index 358fed7aae2734299ecd947f2d593eb13becdbf8..d95da2c57885b78653ccc7a0634e877aa4eb131f 100644 (file)
class TemplateWidget_list extends TemplateWidget
{
- function __construct(&$config, $name, $value, $description,$syntax,$required,$type,$display)
+ function __construct(&$config, $name, $value, $description,$syntax,$required,$type,$display,$values)
{
- parent:: __construct($config, $name, $value, $description,$syntax,$required,$type,$display);
+ parent:: __construct($config, $name, $value, $description,$syntax,$required,$type,$display,$values);
$this->listWidget= new sortableListing($this->value);
$this->listWidget->setEditable(false);