From: hickert Date: Wed, 27 Apr 2011 09:02:37 +0000 (+0000) Subject: Updated checkbox Widget X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=50a7415aae02863785ca6a438ede85cbf8ce320d;p=gosa.git Updated checkbox Widget git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20773 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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]); + } } } ?>