Code

Hide(greyout) kiosk options if no kioskPath is given
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 21 Sep 2007 11:09:25 +0000 (11:09 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 21 Sep 2007 11:09:25 +0000 (11:09 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7367 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index 4e1f3b001001cc824dbf86aeebedb62826f34685..cc8f3c208c20d1bc449e4e314181de2a8a0863ab 100644 (file)
@@ -44,6 +44,7 @@ class environment extends plugin
   var $gotoAvailableShares= array();// Available Shares for this account
   
   /* Kiosk profile */
+  var $kiosk_enabled      = FALSE;
   var $gotoKioskProfile   = "none";     // The selected Kiosk Profile
   var $gotoKioskProfiles  = array();// All available Kiosk profiles
   var $newKioskProfiles   = array();
@@ -211,10 +212,17 @@ class environment extends plugin
     $this->gotoShareSelections= $config->getShareList(true);
     $this->gotoAvailableShares= $config->getShareList(false);  
 
-    $tmp = new kioskManagementDialog($this->config,$this->dn);
-    $list = $tmp->getKioskProfiles($this->newKioskProfiles);
-    $list['none']=_("None");
-    $this->kioskProfileList = array_reverse($list);
+
+    if(search_config($this->config->data,"environment", "KIOSKPATH" != "")){
+      $tmp = new kioskManagementDialog($this->config,$this->dn);
+      $list = $tmp->getKioskProfiles($this->newKioskProfiles);
+      $list['none']=_("None");
+      $this->kioskProfileList = array_reverse($list);
+      $this->kiosk_enabled = TRUE;
+    }else{
+      $this->kiosk_enabled = FALSE;
+      $this->kioskProfileList = array();
+    }
   }
 
 
@@ -238,6 +246,7 @@ class environment extends plugin
 
   /* Fill templating stuff */
   $smarty= get_smarty();
+  $smarty->assign("kiosk_enabled",$this->kiosk_enabled);
   $display= "";
 
   /* Prepare all variables for smarty */
index fc1169931473656dadde568d9f58ef02a3c13597..fbc7c876f59cd9a302864ccf7fcdacc66f3fd84c 100644 (file)
@@ -60,6 +60,9 @@
                                </table>
                </td>
                <td style="vertical-align:top">
+
+                       {if $kiosk_enabled}
+
                        <table summary="{t}Kiosk profile settings{/t}">
                                <tr>
                                        <td>
                                        </td>
                                </tr>
                        </table>        
+                       {else}
+                       <table summary="{t}Kiosk profile settings{/t}">
+                               <tr>
+                                       <td>
+                                               <label for="dummy1">{t}Kiosk profile{/t}</label>
+                                       </td>
+                                       <td>
+                                               <select name="dummy1" disabled id="dummy1"><option disabled>&nbsp;</option></select>
+                                               <input type="button" disabled name="dummy2" value="{t}Manage{/t}">
+                                       </td>
+                               </tr>
+                               <tr>
+                                       <td colspan=2>
+                                               <br>
+                                               <input type="checkbox" disabled name="dummy3" id="dummy3"> 
+                                               <label for="dummy3">{t}Resolution changeable during session{/t}</label>
+                                       </td>
+                               </tr>
+                               <tr>
+                                       <td>
+                                               <label for="dummy4">{t}Resolution{/t}</label>
+                                       </td>
+                                       <td>
+                                               <select name="dummy4" id="dummy4" disabled>
+                            <option disabled>&nbsp;</option>
+                       </select>
+                                       </td>
+                               </tr>
+                       </table>        
+                       {/if}
    </td>
   </tr>
 </table>