Code

Fixed js for proxy account
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 30 Nov 2005 07:50:26 +0000 (07:50 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 30 Nov 2005 07:50:26 +0000 (07:50 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2140 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/connectivity/class_proxyAccount.inc
plugins/personal/connectivity/proxy.tpl

index 036798990778a41aa03675efc243771460ae6a93..bc50bb78e2fd46cf397e996f61c151a5e2fa98ba 100644 (file)
@@ -37,18 +37,11 @@ class proxyAccount extends plugin
 
     /* Prepare templating */
     $smarty= get_smarty();
-    $smarty->assign("proxyAccountACL", chkacl($this->acl, "proxyAccount"));
-    $smarty->assign("gosaProxyAcctFlagsACL", chkacl($this->acl, "gosaProxyAcctFlags"));
+    $smarty->assign("proxyAccountACL",          chkacl($this->acl, "proxyAccount"));
+    $smarty->assign("gosaProxyAcctFlagsACL",    chkacl($this->acl, "gosaProxyAcctFlags"));
     $smarty->assign("gosaProxyWorkingStartACL", chkacl($this->acl, "gosaProxyWorkingStart"));
-    $smarty->assign("gosaProxyWorkingStopACL", chkacl($this->acl, "gosaProxyWorkingStop"));
-    $smarty->assign("gosaProxyQuotaACL", chkacl($this->acl, "gosaProxyQuota"));
-
-    /* Show checkbox? */
-    if ($this->parent != NULL){
-      $smarty->assign("tabbed", "1");
-    } else {
-      $smarty->assign("tabbed", "0");
-    }
+    $smarty->assign("gosaProxyWorkingStopACL",  chkacl($this->acl, "gosaProxyWorkingStop"));
+    $smarty->assign("gosaProxyQuotaACL",        chkacl($this->acl, "gosaProxyQuota"));
 
     /* Assign radio boxes */
     foreach (array("F", "T", "B", "N") as $val){
@@ -62,7 +55,11 @@ class proxyAccount extends plugin
         $smarty->assign("filter$val", "");
 
         /* Same as above */
-        $smarty->assign($val."state", "disabled");
+        if($_SESSION['js']==1){
+          $smarty->assign($val."state", "disabled");
+        }else{
+          $smarty->assign($val."state", "");
+        }
       }
     }
 
@@ -196,6 +193,12 @@ class proxyAccount extends plugin
       }
     }
 
+    if(isset($_POST['proxy'])){
+      $this->is_account = TRUE; 
+    }else{
+      $this->is_account = FALSE;
+    }
+
     /* Save flag value */
     if ($this->is_account){
       if (chkacl ($this->acl, "gosaProxyAcctFlags") == ""){
index 4cfc13e84abc5aba53c43be77768e8a2479d536a..f7405d3af19b02d94bc9b6a9962c08b1077d60dc 100644 (file)
@@ -2,6 +2,7 @@
                <input type="checkbox" id="proxy" name="proxy" value="B" {$proxyState} {$proxyAccountACL} 
                        onClick="
                                {$changeA}
+                               
                                changeTripleSelectState('proxy', 'filterB', 'quota_size'); 
                                changeTripleSelectState('proxy', 'filterB', 'quota_unit'); 
                                changeTripleSelectState('proxy', 'filterB', 'gosaProxyQuotaPeriod');