Code

Updated template file to send contents in b64 format
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 14 Apr 2011 13:02:25 +0000 (13:02 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 14 Apr 2011 13:02:25 +0000 (13:02 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20733 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto-ng/admin/newConfigManagement/TemplateEngine/class_TemplateWidget_file.inc

index 1e41cd9be48f2cb1d9f8bbf08a486f99c404d88a..d73f64641e4c474e134b85fe9261c5527e4f121c 100644 (file)
@@ -2,6 +2,31 @@
 
 class TemplateWidget_file extends TemplateWidget
 {
+    /*! \brief  Constructs the template widget and sets the default values.
+     *  @param  Config  The GOsa configuration object.
+     *  @param  String  A name for the widget.
+     *  @param  String  The initial value.
+     *  @param  String  A description.
+     *  @param  String  True/False  Must-Value/Optional-Value.
+     *  @param  String  The widget type.
+     *  @param  String  A display name for the widget.
+     */
+    function __construct(&$config, $name, $value, $description,$syntax,$required,$type,$display, $values=array())
+    {
+        $value = base64_decode($value);
+        TemplateWidget::__construct($config, $name, $value, $description,$syntax,$required,$type,$display, $values);
+    }
+
+
+    /*! \brief  Returns the current value.
+     *  @return  Mixed  The widgets value.
+     */
+    function getValue()
+    {
+        return(base64_encode($this->value));
+    }
+
+
     function render()
     {
         $title = set_post($this->description);