From d46c6ce1fe951149860e0b0ca6595850f056c6d0 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 21 Sep 2007 11:09:25 +0000 Subject: [PATCH] Hide(greyout) kiosk options if no kioskPath is given git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7367 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../environment/class_environment.inc | 17 +++++++--- plugins/personal/environment/environment.tpl | 33 +++++++++++++++++++ 2 files changed, 46 insertions(+), 4 deletions(-) diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc index 4e1f3b001..cc8f3c208 100644 --- a/plugins/personal/environment/class_environment.inc +++ b/plugins/personal/environment/class_environment.inc @@ -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 */ diff --git a/plugins/personal/environment/environment.tpl b/plugins/personal/environment/environment.tpl index fc1169931..fbc7c876f 100644 --- a/plugins/personal/environment/environment.tpl +++ b/plugins/personal/environment/environment.tpl @@ -60,6 +60,9 @@ + + {if $kiosk_enabled} +
@@ -94,6 +97,36 @@
+ {else} + + + + + + + + + + + + +
+ + + + +
+
+ + +
+ + + +
+ {/if} -- 2.30.2