Code

Updated intranet account plugin.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 9 Jul 2008 13:17:28 +0000 (13:17 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 9 Jul 2008 13:17:28 +0000 (13:17 +0000)
-Fixed checkbox toggling, grayout is now correctly used.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11583 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/connectivity/personal/connectivity/class_intranetAccount.inc

index fddfeba42a0abc0df39cced847cc0e76dceeeae1..49039c6058d22e2d185b941936bbb748bfb92938 100644 (file)
@@ -86,7 +86,14 @@ class intranetAccount extends plugin
       $smarty->assign("tabbed", 0);    
     }
 
-    $smarty->assign('gosaIntranetACL', $this->getacl("",$this->ReadOnly));
+    /* check if we are allowed to switch the checkbox.
+     */
+    $smarty->assign('gosaIntranetACL', preg_replace("/w/","",$this->getacl("",$this->ReadOnly)));
+    if(($this->acl_is_removeable() && $this->is_account) || 
+       ($this->acl_is_createable() && !$this->is_account)){
+      $smarty->assign('gosaIntranetACL', $this->getacl("",$this->ReadOnly));
+    }
+
     $smarty->assign("use_intranet",in_array("intranet",$this->multi_boxes));
     $smarty->assign("multiple_support",$this->multiple_support_active);
     $display.= $smarty->fetch (get_template_path('intranet.tpl', TRUE, dirname(__FILE__)));