Code

Updated TODO
[gosa.git] / plugins / personal / connectivity / class_proxyAccount.inc
index 06a6c0090a83161dbd24d9795ad46492399c0a4f..740e32be21fb697b3f3439a8e221253547a96a20 100644 (file)
@@ -42,6 +42,8 @@ class proxyAccount extends plugin
     /* Show checkbox? */
     if ($this->parent != NULL){
       $smarty->assign("tabbed", "1");
+    } else {
+      $smarty->assign("tabbed", "0");
     }
 
     /* Assign radio boxes */
@@ -49,12 +51,13 @@ class proxyAccount extends plugin
       if (is_integer(strpos($this->gosaProxyAcctFlags, "$val"))) {
         $smarty->assign("filter$val", "checked");
 
-        // Create state variable for checkbox (Used in proxy.tpl)
+        /* Add state variables for on-the-fly state-changing of checkboxes */
         $smarty->assign($val."state", "");
+        
       } else {
         $smarty->assign("filter$val", "");
-        
-        // Create state variable for checkbox (Used in proxy.tpl)
+
+        /* Same as above */
         $smarty->assign($val."state", "disabled");
       }
     }
@@ -115,6 +118,25 @@ class proxyAccount extends plugin
     $this->handle_post_events("remove");
   }
 
+  /* Check values */
+  function check()
+  {
+    $message= array();
+    
+    /* We've got only one value to check for positive integer or emtpy field */
+    if ($this->is_account){
+      if (isset($_POST["quota_size"])){
+        if ($_POST["quota_size"] == ""){
+          $message[]= _("Numerical value for Quota Setting is empty.");
+        }
+        else if ($_POST["quota_size"] <= 0){
+          $message[]= _("Numerical value for Quota Setting is not valid.");
+        }
+      }
+    }
+
+    return $message;
+  }
 
   /* Save data to object */
   function save_object()