summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: da83f20)
raw | patch | inline | side by side (parent: da83f20)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 27 Sep 2010 12:06:14 +0000 (12:06 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 27 Sep 2010 12:06:14 +0000 (12:06 +0000) |
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 48ef8f719a20361156d0cbdabc550f1ee76e4451..317313c3396ff70b959a4ac79842ccf60849ecef 100644 (file)
"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 258a547327a98acfe4329b45e4ad6fec3edbbb9b..3ef186298a3f7a6feb85bd7abd9b2d619bb558ad 100644 (file)
$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 15935ae9068b325dd8feebbb91b4ea54b8525149..d686439c19832711746d834c7640ec277db9fbcc 100644 (file)
$class = get_class();
$this->postName = "{$class}_{$this->name}";
}
+
+ function getDisplayName()
+ {
+ return($this->display);
+ }
function render()
{
- return("{$this->display} <input type='text' name=\"{$this->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 a7072ac69eee9eff93fa9085260faf024840f4e3..3f1f457efafe1f77e6c76aa08ec0e86d54279f7f 100644 (file)
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 159f97a3d37d6d8969db65ab39c790a532286528..1ff9520a5e47d44ca366d3db3863fae56db0dc5a 100644 (file)
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("<input type='text' name=\"{$this->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
--- /dev/null
@@ -0,0 +1,12 @@
+<?php
+
+class TemplateWidget_textarea extends TemplateWidget
+{
+ function render()
+ {
+ return("<textarea type='text' name=\"{$this->postName}\">".set_post($this->value)."</textarea>");
+ }
+
+}
+
+?>
diff --git a/gosa-plugins/goto/admin/systems/goto/Config/puppet.tpl b/gosa-plugins/goto/admin/systems/goto/Config/puppet.tpl
index 92506229e71bba80c4b813b5b43fd900f5c8ca8f..78a90826ccdd59c38687b30d9c778a865c71fc0c 100644 (file)
{if $type == 'PuppetModule'}
- <br>{$dependency}
- <br>{$version}
- <br>{$name}
- <br>{$description}
+ <table width="100%">
+ <tr>
+ <td style="width:50%; vertical-align: top;">
+ <table>
+ <tr>
+ <td>{$nameName}</td>
+ <td>{$name}</td>
+ </tr>
+ <tr>
+ <td>{$descriptionName}</td>
+ <td>{$description}</td>
+ </tr>
+ <tr>
+ <td>{$versionName}</td>
+ <td>{$version}</td>
+ </tr>
+ </table>
+ </td>
+ <td style="width:50%; vertical-align: top;">
+ {$dependencyName}
+ {$dependency}
+ </td>
+ </tr>
+ </table>
+
{/if}