From: hickert Date: Mon, 27 Sep 2010 12:06:14 +0000 (+0000) Subject: Updated widgets form item management X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=86b057bdfd9ff51a0724b21f008993d1c83df461;p=gosa.git Updated widgets form item management git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19799 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 48ef8f719..317313c33 100644 --- a/gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc +++ b/gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc @@ -31,7 +31,7 @@ class DeviceConfig extends plugin "required": true, "value": "", "syntax": "^[a-zA-Z0-9_+.-]+$", - "type": "string", + "type": "textarea", "display": "Module version" }, "name": { 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 258a54732..3ef186298 100644 --- a/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateEngine.inc +++ b/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateEngine.inc @@ -76,6 +76,7 @@ class TemplateEngine $smarty->assign("type", $this->itemType); foreach($this->widgets as $widget){ $smarty->assign($widget->getName(), $widget->render()); + $smarty->assign($widget->getName()."Name", $widget->getDisplayName()); } return($smarty->fetch(get_template_path("goto/Config/{$this->template}", TRUE))); } 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 15935ae90..d686439c1 100644 --- a/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget.inc +++ b/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget.inc @@ -22,11 +22,16 @@ class TemplateWidget $class = get_class(); $this->postName = "{$class}_{$this->name}"; } + + function getDisplayName() + { + return($this->display); + } function render() { - return("{$this->display} postName}\" value=\"".set_post($this->value)."\">"); + return(""); } function save_object() 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 a7072ac69..3f1f457ef 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 @@ -18,7 +18,7 @@ class TemplateWidget_list extends TemplateWidget function render() { - $str = $this->display." "; + $str = ""; $this->listWidget->setListData($this->value); $this->listWidget->update(); $str .= $this->listWidget->render(); diff --git a/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget_string.inc b/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget_string.inc index 159f97a3d..1ff9520a5 100644 --- a/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget_string.inc +++ b/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget_string.inc @@ -2,52 +2,10 @@ class TemplateWidget_string extends TemplateWidget { - protected $name = "unnamed"; - protected $value = ""; - - protected $description = ""; - protected $required = ""; - protected $type = ""; - protected $display = ""; - - function __construct(&$config, $name, $value, $description,$required,$type,$display) - { - $this->config = &$config; - $this->name = $name; - $this->value = $value; - $this->description = $description; - $this->required = $required; - $this->type = $type; - $this->display = $display; - $class = get_class(); - $this->postName = "{$class}_{$this->name}"; - } - - function render() { - return(""); + return("postName}\" value=\"".set_post($this->value)."\">"); } - - function save_object() - { - } - - function getValue() - { - return($this->value); - } - - function getName() - { - return($this->name); - } - - function setValue($value) - { - $this->value = $value; - } - } ?> diff --git a/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget_textarea.inc b/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget_textarea.inc new file mode 100644 index 000000000..26c733c47 --- /dev/null +++ b/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget_textarea.inc @@ -0,0 +1,12 @@ +postName}\">".set_post($this->value).""); + } + +} + +?> diff --git a/gosa-plugins/goto/admin/systems/goto/Config/puppet.tpl b/gosa-plugins/goto/admin/systems/goto/Config/puppet.tpl index 92506229e..78a90826c 100644 --- a/gosa-plugins/goto/admin/systems/goto/Config/puppet.tpl +++ b/gosa-plugins/goto/admin/systems/goto/Config/puppet.tpl @@ -1,6 +1,27 @@ {if $type == 'PuppetModule'} -
{$dependency} -
{$version} -
{$name} -
{$description} + + + + + +
+ + + + + + + + + + + + + +
{$nameName}{$name}
{$descriptionName}{$description}
{$versionName}{$version}
+
+ {$dependencyName} + {$dependency} +
+ {/if}