Code

Updated TODO
[gosa.git] / plugins / personal / connectivity / class_proxyAccount.inc
index 5e97daa8dd5be8ae48baa406007f46716eade90e..740e32be21fb697b3f3439a8e221253547a96a20 100644 (file)
@@ -42,14 +42,23 @@ class proxyAccount extends plugin
     /* Show checkbox? */
     if ($this->parent != NULL){
       $smarty->assign("tabbed", "1");
+    } else {
+      $smarty->assign("tabbed", "0");
     }
 
     /* Assign radio boxes */
     foreach (array("F", "T", "B", "N") as $val){
       if (is_integer(strpos($this->gosaProxyAcctFlags, "$val"))) {
         $smarty->assign("filter$val", "checked");
+
+        /* Add state variables for on-the-fly state-changing of checkboxes */
+        $smarty->assign($val."state", "");
+        
       } else {
         $smarty->assign("filter$val", "");
+
+        /* Same as above */
+        $smarty->assign($val."state", "disabled");
       }
     }
 
@@ -173,10 +182,14 @@ class proxyAccount extends plugin
       /* Save quota values */
       if (chkacl ($this->acl, "gosaProxyQuota") == ""){
         $old= $this->gosaProxyQuota;
-        $this->gosaProxyQuota= $_POST["quota_size"].$_POST["quota_unit"];
+        if(isset($_POST["quota_size"]) && isset($_POST["quota_unit"])){
+          $this->gosaProxyQuota= $_POST["quota_size"].$_POST["quota_unit"];
+        }
         $this->is_modified= ($old != $this->gosaProxyQuota)?TRUE:$this->is_modified;
         $old= $this->gosaProxyQuotaPeriod;
-        $this->gosaProxyQuotaPeriod = $_POST["gosaProxyQuotaPeriod"];
+        if(isset($_POST["gosaProxyQuotaPeriod"])){
+          $this->gosaProxyQuotaPeriod = $_POST["gosaProxyQuotaPeriod"];
+        }
         $this->is_modified= ($old != $this->gosaProxyQuotaPeriod)?TRUE:$this->is_modified;
       }
     }