From 283344543f7a8add955a0e44eb5fbe6433dd8f39 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 14 Nov 2006 11:41:17 +0000 Subject: [PATCH] Hide toggle default printer option, if current object is a group git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5107 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../personal/environment/class_environment.inc | 16 ++++++++++------ plugins/personal/environment/environment.tpl | 4 ++++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc index 8b06f7af1..57aa9f139 100644 --- a/plugins/personal/environment/class_environment.inc +++ b/plugins/personal/environment/class_environment.inc @@ -761,13 +761,15 @@ class environment extends plugin } } - if((isset($_POST['gotoPrinterDefault']))&&(isset($_POST['gotoPrinterSel']))&&(!empty($_POST['gotoPrinterSel']))){ - if ($this->gosaDefaultPrinter == $_POST['gotoPrinterSel'][0]){ - $this->gosaDefaultPrinter= ""; - } else { - $this->gosaDefaultPrinter= $_POST['gotoPrinterSel'][0]; + if(!$this->is_group){ + if((isset($_POST['gotoPrinterDefault']))&&(isset($_POST['gotoPrinterSel']))&&(!empty($_POST['gotoPrinterSel']))){ + if ($this->gosaDefaultPrinter == $_POST['gotoPrinterSel'][0]){ + $this->gosaDefaultPrinter= ""; + } else { + $this->gosaDefaultPrinter= $_POST['gotoPrinterSel'][0]; + } } - } + } $smarty->assign("gotoPrinter",$this->printOutPrinterDevices()); $smarty->assign("gotoPrinterKeys",array_flip($this->printOutPrinterDevices())); @@ -801,6 +803,8 @@ class environment extends plugin $smarty->assign("gotoProfileQuotaACL"," disabled "); } + $smarty->assign("is_group",$this->is_group); + /* Als smarty vars are set. Get smarty template and generate output */ $display.= $smarty->fetch(get_template_path('environment.tpl', TRUE,dirname(__FILE__))); return($display); diff --git a/plugins/personal/environment/environment.tpl b/plugins/personal/environment/environment.tpl index ee1d37ba5..6271a4dc0 100644 --- a/plugins/personal/environment/environment.tpl +++ b/plugins/personal/environment/environment.tpl @@ -180,7 +180,11 @@ +{if $is_group } + +{else} +{/if} -- 2.30.2