Code

Disable fields with javascript, implemented in environmenttab
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 26 Aug 2005 08:41:25 +0000 (08:41 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 26 Aug 2005 08:41:25 +0000 (08:41 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1223 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/environment/class_environment.inc
plugins/personal/environment/environment.tpl

index 44f2ae039e7606c585af5b8a34e0390d747237ab..74ae70170038a34d2a51d9d9df6528997939b307 100644 (file)
@@ -220,7 +220,14 @@ class environment extends plugin
       }
  
     }
-  
+    if($this->acl != "#none#"){
+      $smarty->assign("useProfileACL","");
+    }else{
+      $smarty->assign("gotoProfileFlag_CACL"," disabled ");
+      $smarty->assign("gotoProfileServer"," disabled ");
+    }
+
     /* HANDLE Profile Settings here 
      * Assign available Quota and resolution settings
      * Get all available profile server
@@ -475,7 +482,12 @@ class environment extends plugin
       $this->dialog->save_object();
       return ($this->dialog->execute());
     }
+    if($this->acl != "#none#"){
+      $smarty->assign("useProfileACL","");
+    }else{
+      $smarty->assign("gotoProfileFlagsACL"," disabled ");
+      $smarty->assign("gotoProfileServerACL"," disabled ");
+    }
     /* Als smarty vars are set. Get smarty template and generate output */
     $display.= $smarty->fetch(get_template_path('environment.tpl', TRUE,dirname(__FILE__)));
     
index e182f88d13e6299990c477b70091c4ca8f0dba34..ce678dc12b0b2b03bdda533b62d0e4709ad9cc1b 100644 (file)
@@ -10,7 +10,8 @@
                        <table summary="">
                                <tr>
                                        <td>
-                                               <input type="checkbox" value="1" {$useProfileCHK} name="useProfile" {$useProfileACL}>
+                                               <input type="checkbox" value="1" {$useProfileCHK} name="useProfile" {$useProfileACL} 
+                                                                       onclick="changeState('gotoProfileServer');changeState('gotoProfileFlag_C');">
                                        </td>
                                        <td valign="top">
                                                {t}Use profile managment{/t}
@@ -26,7 +27,7 @@
                                                                        {t}Profil server{/t}
                                                                </td>
                                                                <td>
-                                                                       <select style="width:350px;" name="gotoProfileServer" {$gotoProfileACL}>
+                                                                       <select style="width:350px;" name="gotoProfileServer" {$gotoProfileServerACL} id="gotoProfileServer">
                                                                                {html_options values=$gotoProfileServers output=$gotoProfileServers selected=$gotoProfileServer}
                                                                                <option disabled>&nbsp;</option>
                                                                        </select>
@@ -37,7 +38,7 @@
                                                                        {t}Use local caching{/t}
                                                                </td>
                                                                <td>
-                                                                       <input type="checkbox" name="gotoProfileFlag_C" value="C" {$gotoProfileACL} {$gotoProfileFlag_CCHK}>
+                                                                       <input type="checkbox" name="gotoProfileFlag_C" value="C" id="gotoProfileFlag_C" {$gotoProfileFlagsACL} {$gotoProfileFlag_CCHK}>
                                                                </td>
                                                        </tr>
                                                </table>