Code

Disable table tab, if edited entry is a terminal template
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 24 Jan 2006 08:11:30 +0000 (08:11 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 24 Jan 2006 08:11:30 +0000 (08:11 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2545 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_printGeneric.inc

index fc743ce969414ae6b89fe9511a60c69e73967518..c68fd3bbe0d522807376fa71b129437636d5b70a 100644 (file)
@@ -166,6 +166,20 @@ class printgeneric extends plugin
        /* Call parent execute */
        plugin::execute();
 
+    if(isset($this->parent->by_name['workgeneric'])){
+//      echo "workstation";
+    }elseif(isset($this->parent->by_name['termgeneric'])){
+      if($this->parent->by_object['termgeneric']->cn == "default"){
+        $display= $this->show_header(_("Add printer extension"),
+            _("This is a terminal template, printer tab is disabled."),TRUE,TRUE);
+        $this->is_account= false;
+        return $display;
+      }
+    }elseif(isset($this->parent->by_name['printgeneric'])){
+//      echo "printer";
+    }
+
+
     $smarty= get_smarty();
     $display="";
     /* Template management.