From: hickert Date: Fri, 1 Oct 2010 15:21:17 +0000 (+0000) Subject: #Added provided values list X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1268e9252fcfb3b10ebafbe8ad0fcc94c4d6dff2;p=gosa.git #Added provided values list 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 3c3bc88d9..577079f29 100644 --- a/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateEngine.inc +++ b/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateEngine.inc @@ -86,6 +86,7 @@ class TemplateEngine // 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, @@ -94,7 +95,8 @@ class TemplateEngine $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 0bbfd171a..45f4fae03 100644 --- a/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget.inc +++ b/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget.inc @@ -13,6 +13,7 @@ class TemplateWidget protected $type = ""; protected $display = ""; protected $syntax = ""; + protected $values = ""; /*! \brief Constructs the template widget and sets the default values. * @param Config The GOsa configuration object. @@ -23,7 +24,7 @@ class TemplateWidget * @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; @@ -32,6 +33,7 @@ class TemplateWidget $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 358fed7aa..d95da2c57 100644 --- a/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget_list.inc +++ b/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget_list.inc @@ -2,9 +2,9 @@ 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);