From: hickert Date: Mon, 4 Oct 2010 07:33:04 +0000 (+0000) Subject: Added combobox and checkbox widget X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c0ff69c44ebf6dc49448362ad003415a6da5420a;p=gosa.git Added combobox and checkbox widget git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19896 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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'}