From 50a7415aae02863785ca6a438ede85cbf8ce320d Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 27 Apr 2011 09:02:37 +0000 Subject: [PATCH] Updated checkbox Widget git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20773 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../TemplateEngine/TemplateEngine.tpl | 1 - .../TemplateEngine/class_TemplateWidget_checkbox.inc | 10 ++++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/TemplateEngine.tpl b/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/TemplateEngine.tpl index 9372b25eb..99be42628 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/TemplateEngine.tpl +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/TemplateEngine.tpl @@ -10,4 +10,3 @@ - diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateWidget_checkbox.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateWidget_checkbox.inc index 43318395e..27488cbef 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateWidget_checkbox.inc +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateWidget_checkbox.inc @@ -7,14 +7,20 @@ class TemplateWidget_checkbox extends TemplateWidget $str = ""; $disabled = (!$this->enabled)? "disabled" : ""; $str .= "value) $str .= " checked "; + + if($this->value) $str .= " checked "; + $str .= ">"; + + $str .= ""; return($str); } function save_object() { - $this->value = isset($_POST[$this->postName]); + if(isset($_POST["{$this->postName}_posted"])){ + $this->value = isset($_POST[$this->postName]); + } } } ?> -- 2.30.2