From c0ff69c44ebf6dc49448362ad003415a6da5420a Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 4 Oct 2010 07:33:04 +0000 Subject: [PATCH] Added combobox and checkbox widget git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19896 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../Config/class_TemplateWidget_checkbox.inc | 19 ++++++++++++++++ .../Config/class_TemplateWidget_comboBox.inc | 22 +++++++++++++++++++ .../goto/admin/systems/goto/Config/puppet.tpl | 14 ++++++++++-- 3 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget_checkbox.inc create mode 100644 gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget_comboBox.inc 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 new file mode 100644 index 000000000..cd6cb1b0f --- /dev/null +++ b/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget_checkbox.inc @@ -0,0 +1,19 @@ +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 new file mode 100644 index 000000000..a1f0443bd --- /dev/null +++ b/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget_comboBox.inc @@ -0,0 +1,22 @@ +postName}'>"; + foreach($this->values as $name => $value){ + if($name == $this->value){ + $str .= "\n"; + }else{ + $str .= "\n"; + } + } + $str .= ""; + 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 aceefdb0c..c0359729a 100644 --- a/gosa-plugins/goto/admin/systems/goto/Config/puppet.tpl +++ b/gosa-plugins/goto/admin/systems/goto/Config/puppet.tpl @@ -23,10 +23,20 @@ - {$textEditorName} +
+ {$checkboxName} + {$checkbox} + +
+ {$comboBoxName} + {$comboBox} + +
+ {$textEditorName}
{$textEditor} - {$fixedListName} +
+ {$fixedListName}
{$fixedList} {/if} {if $type == 'PuppetTemplate'} -- 2.30.2