From e81782537a12216cb0d91d5a0f6c750b63075f26 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 28 Feb 2006 05:31:48 +0000 Subject: [PATCH] Added base select icon to systems git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2753 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/systems/class_componentGeneric.inc | 25 +++++++++++++++++++ plugins/admin/systems/class_phoneGeneric.inc | 25 +++++++++++++++++++ plugins/admin/systems/class_printGeneric.inc | 24 ++++++++++++++++++ plugins/admin/systems/class_servGeneric.inc | 25 +++++++++++++++++++ .../admin/systems/class_terminalGeneric.inc | 25 +++++++++++++++++++ plugins/admin/systems/class_winGeneric.inc | 25 +++++++++++++++++++ .../systems/class_workstationGeneric.inc | 25 +++++++++++++++++++ plugins/admin/systems/component.tpl | 1 + plugins/admin/systems/phone.tpl | 3 ++- plugins/admin/systems/printer.tpl | 1 + plugins/admin/systems/server.tpl | 1 + plugins/admin/systems/terminal.tpl | 1 + plugins/admin/systems/wingeneric.tpl | 1 + plugins/admin/systems/workstation.tpl | 1 + 14 files changed, 182 insertions(+), 1 deletion(-) diff --git a/plugins/admin/systems/class_componentGeneric.inc b/plugins/admin/systems/class_componentGeneric.inc index 250261b2c..23c242855 100644 --- a/plugins/admin/systems/class_componentGeneric.inc +++ b/plugins/admin/systems/class_componentGeneric.inc @@ -51,6 +51,31 @@ class componentGeneric extends plugin return($display); } + /* Base select dialog */ + $once = true; + foreach($_POST as $name => $value){ + if(preg_match("/^chooseBase/",$name) && $once){ + $once = false; + $this->dialog = new baseSelectDialog($this->config); + $this->dialog->setCurrentBase($this->base); + } + } + + /* Dialog handling */ + if(is_object($this->dialog)){ + /* Must be called before save_object */ + $this->dialog->save_object(); + + if($this->dialog->isClosed()){ + $this->dialog = false; + }elseif($this->dialog->isSelected()){ + $this->base = $this->dialog->isSelected(); + $this->dialog= false; + }else{ + return($this->dialog->execute()); + } + } + /* Fill templating stuff */ $smarty= get_smarty(); $smarty->assign("bases", $this->config->idepartments); diff --git a/plugins/admin/systems/class_phoneGeneric.inc b/plugins/admin/systems/class_phoneGeneric.inc index ee1916c58..863e7c3d9 100644 --- a/plugins/admin/systems/class_phoneGeneric.inc +++ b/plugins/admin/systems/class_phoneGeneric.inc @@ -106,6 +106,31 @@ class phoneGeneric extends plugin return($display); } + /* Base select dialog */ + $once = true; + foreach($_POST as $name => $value){ + if(preg_match("/^chooseBase/",$name) && $once){ + $once = false; + $this->dialog = new baseSelectDialog($this->config); + $this->dialog->setCurrentBase($this->base); + } + } + + /* Dialog handling */ + if(is_object($this->dialog)){ + /* Must be called before save_object */ + $this->dialog->save_object(); + + if($this->dialog->isClosed()){ + $this->dialog = false; + }elseif($this->dialog->isSelected()){ + $this->base = $this->dialog->isSelected(); + $this->dialog= false; + }else{ + return($this->dialog->execute()); + } + } + /* handle Permit Add*/ if(isset($_POST['goFonPermitAdd'])){ if(isset($_POST['goFonPermitNew'])){ diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc index ed47351ea..6870431ba 100644 --- a/plugins/admin/systems/class_printGeneric.inc +++ b/plugins/admin/systems/class_printGeneric.inc @@ -246,6 +246,30 @@ class printgeneric extends plugin } } + /* Base select dialog */ + $once = true; + foreach($_POST as $name => $value){ + if(preg_match("/^chooseBase/",$name) && $once){ + $once = false; + $this->dialog = new baseSelectDialog($this->config); + $this->dialog->setCurrentBase($this->base); + } + } + + /* Dialog handling */ + if(is_object($this->dialog)){ + /* Must be called before save_object */ + $this->dialog->save_object(); + + if($this->dialog->isClosed()){ + $this->dialog = false; + }elseif($this->dialog->isSelected()){ + $this->base = $this->dialog->isSelected(); + $this->dialog= false; + }else{ + return($this->dialog->execute()); + } + } /* Do we represent a valid printer? */ if (!$this->is_account && $this->parent == NULL){ diff --git a/plugins/admin/systems/class_servGeneric.inc b/plugins/admin/systems/class_servGeneric.inc index 9252d16a9..62a31192a 100644 --- a/plugins/admin/systems/class_servGeneric.inc +++ b/plugins/admin/systems/class_servGeneric.inc @@ -94,6 +94,31 @@ class servgeneric extends plugin } } + /* Base select dialog */ + $once = true; + foreach($_POST as $name => $value){ + if(preg_match("/^chooseBase/",$name) && $once){ + $once = false; + $this->dialog = new baseSelectDialog($this->config); + $this->dialog->setCurrentBase($this->base); + } + } + + /* Dialog handling */ + if(is_object($this->dialog)){ + /* Must be called before save_object */ + $this->dialog->save_object(); + + if($this->dialog->isClosed()){ + $this->dialog = false; + }elseif($this->dialog->isSelected()){ + $this->base = $this->dialog->isSelected(); + $this->dialog= false; + }else{ + return($this->dialog->execute()); + } + } + /* Fill templating stuff */ $smarty= get_smarty(); $smarty->assign("bases", $this->config->idepartments); diff --git a/plugins/admin/systems/class_terminalGeneric.inc b/plugins/admin/systems/class_terminalGeneric.inc index 75556b63d..8b252d8f0 100644 --- a/plugins/admin/systems/class_terminalGeneric.inc +++ b/plugins/admin/systems/class_terminalGeneric.inc @@ -122,6 +122,31 @@ class termgeneric extends plugin } } + /* Base select dialog */ + $once = true; + foreach($_POST as $name => $value){ + if(preg_match("/^chooseBase/",$name) && $once){ + $once = false; + $this->dialog = new baseSelectDialog($this->config); + $this->dialog->setCurrentBase($this->base); + } + } + + /* Dialog handling */ + if(is_object($this->dialog)){ + /* Must be called before save_object */ + $this->dialog->save_object(); + + if($this->dialog->isClosed()){ + $this->dialog = false; + }elseif($this->dialog->isSelected()){ + $this->base = $this->dialog->isSelected(); + $this->dialog= false; + }else{ + return($this->dialog->execute()); + } + } + /* Do we represent a valid terminal? */ if (!$this->is_account && $this->parent == NULL){ $display= "\"\" ". diff --git a/plugins/admin/systems/class_winGeneric.inc b/plugins/admin/systems/class_winGeneric.inc index 089c096ac..5f250619c 100644 --- a/plugins/admin/systems/class_winGeneric.inc +++ b/plugins/admin/systems/class_winGeneric.inc @@ -74,6 +74,31 @@ class wingeneric extends plugin return($display); } + /* Base select dialog */ + $once = true; + foreach($_POST as $name => $value){ + if(preg_match("/^chooseBase/",$name) && $once){ + $once = false; + $this->dialog = new baseSelectDialog($this->config); + $this->dialog->setCurrentBase($this->base); + } + } + + /* Dialog handling */ + if(is_object($this->dialog)){ + /* Must be called before save_object */ + $this->dialog->save_object(); + + if($this->dialog->isClosed()){ + $this->dialog = false; + }elseif($this->dialog->isSelected()){ + $this->base = $this->dialog->isSelected(); + $this->dialog= false; + }else{ + return($this->dialog->execute()); + } + } + /* Fill templating stuff */ $smarty= get_smarty(); diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc index f34e55a8c..f4104e097 100644 --- a/plugins/admin/systems/class_workstationGeneric.inc +++ b/plugins/admin/systems/class_workstationGeneric.inc @@ -115,6 +115,31 @@ class workgeneric extends plugin return($display); } + /* Base select dialog */ + $once = true; + foreach($_POST as $name => $value){ + if(preg_match("/^chooseBase/",$name) && $once){ + $once = false; + $this->dialog = new baseSelectDialog($this->config); + $this->dialog->setCurrentBase($this->base); + } + } + + /* Dialog handling */ + if(is_object($this->dialog)){ + /* Must be called before save_object */ + $this->dialog->save_object(); + + if($this->dialog->isClosed()){ + $this->dialog = false; + }elseif($this->dialog->isSelected()){ + $this->base = $this->dialog->isSelected(); + $this->dialog= false; + }else{ + return($this->dialog->execute()); + } + } + /* Fill templating stuff */ $smarty= get_smarty(); $smarty->assign("cn", $this->cn); diff --git a/plugins/admin/systems/component.tpl b/plugins/admin/systems/component.tpl index a1581c2d5..2b27b6aa4 100644 --- a/plugins/admin/systems/component.tpl +++ b/plugins/admin/systems/component.tpl @@ -15,6 +15,7 @@ + diff --git a/plugins/admin/systems/phone.tpl b/plugins/admin/systems/phone.tpl index f08591542..c640f8c1c 100644 --- a/plugins/admin/systems/phone.tpl +++ b/plugins/admin/systems/phone.tpl @@ -14,7 +14,8 @@ + + diff --git a/plugins/admin/systems/printer.tpl b/plugins/admin/systems/printer.tpl index 37b42402f..8379bfe48 100644 --- a/plugins/admin/systems/printer.tpl +++ b/plugins/admin/systems/printer.tpl @@ -22,6 +22,7 @@ + diff --git a/plugins/admin/systems/server.tpl b/plugins/admin/systems/server.tpl index fe84f853c..e3ce344fb 100644 --- a/plugins/admin/systems/server.tpl +++ b/plugins/admin/systems/server.tpl @@ -15,6 +15,7 @@ + diff --git a/plugins/admin/systems/terminal.tpl b/plugins/admin/systems/terminal.tpl index 2da3738a6..5827b7df2 100644 --- a/plugins/admin/systems/terminal.tpl +++ b/plugins/admin/systems/terminal.tpl @@ -20,6 +20,7 @@ + diff --git a/plugins/admin/systems/wingeneric.tpl b/plugins/admin/systems/wingeneric.tpl index d7f69b66b..666b32016 100644 --- a/plugins/admin/systems/wingeneric.tpl +++ b/plugins/admin/systems/wingeneric.tpl @@ -15,6 +15,7 @@ + diff --git a/plugins/admin/systems/workstation.tpl b/plugins/admin/systems/workstation.tpl index d278f5314..e1016ea7d 100644 --- a/plugins/admin/systems/workstation.tpl +++ b/plugins/admin/systems/workstation.tpl @@ -29,6 +29,7 @@ + -- 2.30.2