summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6c81800)
raw | patch | inline | side by side (parent: 6c81800)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 4 Oct 2010 07:33:04 +0000 (07:33 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 4 Oct 2010 07:33:04 +0000 (07:33 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19896 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget_checkbox.inc | [new file with mode: 0644] | patch | blob |
gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget_comboBox.inc | [new file with mode: 0644] | patch | blob |
gosa-plugins/goto/admin/systems/goto/Config/puppet.tpl | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget_checkbox.inc b/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget_checkbox.inc
--- /dev/null
@@ -0,0 +1,19 @@
+<?php
+
+class TemplateWidget_checkbox extends TemplateWidget
+{
+ function render()
+ {
+ $str = "";
+ $str .= "<input type='checkbox' value='1' name='{$this->postName}' ";
+ if($this->value) $str .= " checked ";
+ $str .= ">";
+ return($str);
+ }
+
+ function save_object()
+ {
+ $this->value = isset($_POST[$this->postName]);
+ }
+}
+?>
diff --git a/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget_comboBox.inc b/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget_comboBox.inc
--- /dev/null
@@ -0,0 +1,22 @@
+<?php
+
+class TemplateWidget_comboBox extends TemplateWidget
+{
+ function render()
+ {
+ $str = "";
+
+ // Build up list data
+ $str .= "<select size='1' name='{$this->postName}'>";
+ foreach($this->values as $name => $value){
+ if($name == $this->value){
+ $str .= "<option selected value=\"{$name}\">{$value}</option>\n";
+ }else{
+ $str .= "<option value=\"{$name}\">{$value}</option>\n";
+ }
+ }
+ $str .= "</select>";
+ return($str);
+ }
+}
+?>
diff --git a/gosa-plugins/goto/admin/systems/goto/Config/puppet.tpl b/gosa-plugins/goto/admin/systems/goto/Config/puppet.tpl
index aceefdb0cf818d9380bd42262248b46cfba55a01..c0359729aa2faed5b5f9e6558277fbfb1bf63781 100644 (file)
</td>
</tr>
</table>
- {$textEditorName}
+ <hr>
+ {$checkboxName}
+ {$checkbox}
+
+ <hr>
+ {$comboBoxName}
+ {$comboBox}
+
+ <hr>
+ {$textEditorName}<br>
{$textEditor}
- {$fixedListName}
+ <hr>
+ {$fixedListName}<br>
{$fixedList}
{/if}
{if $type == 'PuppetTemplate'}