Code

Removed non ldap attributes from attributes array
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 17 Oct 2005 11:00:06 +0000 (11:00 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 17 Oct 2005 11:00:06 +0000 (11:00 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1584 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index 01a3f0c32c8e882f4739adee9451c147fb0dd04d..76f709634fc428c1825c17d048b89b621ea01fce 100644 (file)
@@ -59,8 +59,8 @@ class environment extends plugin
 
   /* general settings */
   // Sets the attributes which will kept on page reload, which will be saved, ...
-  var $attributes         = array("uid","useProfile","gotoProfileServer","gotoProfileServers","gotoProfileFlags","gotoProfileFlag_C",
-                                    "gotoXResolution","gotoProfileFlag_L","gotoProfileQuota",
+  var $attributes         = array("uid","gotoProfileServer","gotoProfileFlags",
+                                    "gotoXResolution","gotoProfileQuota",
                                     "gotoLogonScripts","gotoLogonScript",
                                     "gotoPrinters",
                                     "gotoShares","gotoShare","gotoShareSelections",
@@ -313,6 +313,18 @@ class environment extends plugin
      * Assign this all to Smarty 
      */
 
+    if(empty($this->gotoProfileFlag_L)){
+      $smarty->assign("gotoProfileFlag_LCHK"," ");
+    }else{
+      $smarty->assign("gotoProfileFlag_LCHK"," checked ");
+    }
+
+    if(empty($this->gotoProfileFlag_C)){
+      $smarty->assign("gotoProfileFlag_CCHK"," ");
+    }else{
+      $smarty->assign("gotoProfileFlag_CCHK"," checked ");
+    }
+
     if(empty($this->useProfile)){
       $smarty->assign("gotoProfileACL","disabled"); 
       $smarty->assign("useProfileCHK",""); 
@@ -597,7 +609,7 @@ class environment extends plugin
     plugin::remove_from_parent();
 
     /* Don't save our template variables */
-    $skip = array("useProfile","uid","gotoProfileServers","gotoProfileFlag_C","gotoProfileFlag_L",
+    $skip = array("uid",
                   "gotoLogonScripts","gotoPrinters","gotoShares","gotoKioskProfiles","gotoHotplugDevices",
                   "gotoPrinter");
     /* Skip all these attributes */
@@ -623,8 +635,26 @@ class environment extends plugin
     /* Get all Posted vars 
      * Setup checkboxes 
      */
+   
     
     if(isset($_POST['iamposted'])){
+      if(isset($_POST['useProfile'])){
+        $this->useProfile = $_POST['useProfile'];
+      }else{
+        $this->useProfile = true;
+      }
+      if(isset($_POST['gotoProfileFlag_C'])){
+        $this->gotoProfileFlag_C = $_POST['gotoProfileFlag_C'];
+      }else{
+        $this->gotoProfileFlag_C = false;
+      }
+      if(isset($_POST['gotoProfileFlag_L'])){
+        $this->gotoProfileFlag_L = $_POST['gotoProfileFlag_L'];
+      }else{
+        $this->gotoProfileFlag_L = false;
+      }
+
       plugin::save_object();
       foreach($this->attributes as $s_attr){
         if(in_array($s_attr,array("gotoShares","gotoHotplugDevices","gotoPrinters","gotoLogonScripts","uid"))) continue;
index 3802b2442851bc52cfc55e0b199eabd8466336fc..447eb359fc3a203d2e6335dd6e7f99d71d9eed23 100644 (file)
@@ -38,7 +38,7 @@
                                                        <tr>
                                                                <td colspan=2>  
                                                                        <input type="checkbox" name="gotoProfileFlag_C" value="C" 
-                                                                               id="gotoProfileFlag_C" {$gotoProfileFlag_CACL} {$gotoProfileFlag_CCHK}>&nbsp;
+                                                                               id="gotoProfileFlag_C" {$gotoProfileACL} {$gotoProfileFlag_CCHK}>&nbsp;
                                                                        <LABEL for="gotoProfileFlag_C">{t}Cache profile localy{/t}</LABEL>
                                                                </td>
                                                        </tr>
@@ -75,7 +75,7 @@
                                </tr>
                                <tr>
                                        <td colspan=2>
-                                               <input type="checkbox" name="gotoProfileFlag_L" id="gotoProfileFlag_L" value="L" {$gotoProfileFlagsACL} {$gotoProfileFlag_LCHK}>
+                                               <input type="checkbox" name="gotoProfileFlag_L" id="gotoProfileFlag_L" value="L" {$gotoProfileACL} {$gotoProfileFlag_LCHK}>
                                                <LABEL for="gotoProfileFlag_L">{t}Resolution changeable on runtime{/t}</LABEL>
                                        </td>
                                </tr>