From: hickert Date: Thu, 19 May 2011 09:24:58 +0000 (+0000) Subject: Updated Template widgets to support readable acls X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=dbac56e4e0cdc18722d751ecc3d49ca28967ccf1;p=gosa.git Updated Template widgets to support readable acls git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20882 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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 acb795840..a999ac313 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 @@ -9,7 +9,7 @@ class TemplateWidget_checkbox extends TemplateWidget $str = ""; $str .= "value) $str .= " checked "; + if($this->value && $this->readable) $str .= " checked "; $str .= ">"; $str .= ""; diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateWidget_combobox.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateWidget_combobox.inc index 7be45f158..f90b6967a 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateWidget_combobox.inc +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateWidget_combobox.inc @@ -11,11 +11,13 @@ class TemplateWidget_combobox extends TemplateWidget $name = (!$this->enabled || !$this->writeable)? "dummy".rand(0,10000) : $this->postName; $str .= ""; diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateWidget_fixedList.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateWidget_fixedList.inc index 892d4ba35..bfbd02dd9 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateWidget_fixedList.inc +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateWidget_fixedList.inc @@ -45,8 +45,10 @@ class TemplateWidget_fixedList extends TemplateWidget $this->listWidget->update(); $str .= $this->listWidget->render(); $str .= ""; $str .= ""; diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateWidget_string.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateWidget_string.inc index 546517aa5..795c44376 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateWidget_string.inc +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateWidget_string.inc @@ -5,7 +5,7 @@ class TemplateWidget_string extends TemplateWidget function render() { $desc = set_post($this->description); - $value = set_post($this->value); + $value = ($this->readable) ? set_post($this->value) : ''; $name = " name=\"{$this->postName}\" "; $value = " value=\"{$value}\" "; diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateWidget_stringLong.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateWidget_stringLong.inc index 02d2ad0db..967195a6e 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateWidget_stringLong.inc +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateWidget_stringLong.inc @@ -5,7 +5,7 @@ class TemplateWidget_stringLong extends TemplateWidget function render() { $desc = set_post($this->description); - $value = set_post($this->value); + $value = ($this->readable) ? set_post($this->value) : ""; $name = " name=\"{$this->postName}\" "; $value = " value=\"{$value}\" "; diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateWidget_textarea.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateWidget_textarea.inc index 0cbd34246..f6fb1862c 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateWidget_textarea.inc +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateWidget_textarea.inc @@ -8,11 +8,13 @@ class TemplateWidget_textarea extends TemplateWidget $disabled = (!$this->enabled || !$this->writeable)? "disabled" : ""; $name = (!$this->enabled || !$this->writeable)? "dummy".rand(0,10000) : $this->postName; + + $value = ($this->readable) ? $this->value : ""; return(""); + name=\"{$name}\">".set_post($value).""); } }