From 7d940205d337a052321cd1f828bd8202769fab8e Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 22 Oct 2007 08:16:25 +0000 Subject: [PATCH] Hide the "apply" button if we are editing a new Device (ArpDevice) git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7614 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_systemManagement.inc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/plugins/admin/systems/class_systemManagement.inc b/plugins/admin/systems/class_systemManagement.inc index 331e2add8..1685af29c 100644 --- a/plugins/admin/systems/class_systemManagement.inc +++ b/plugins/admin/systems/class_systemManagement.inc @@ -815,15 +815,17 @@ class systems extends plugin /* Don't show buttons if tab dialog requests this */ - $dialog = FALSE; - if(isset($this->systab->by_object[$this->systab->current]->dialog)){ + $dialog = FALSE; + $hide_apply = $this->dn == "new"; + if(is_object($this->systab) && !isset($this->systab->by_object)){ + $dialog = TRUE; + $hide_apply = TRUE; + }elseif(isset($this->systab->by_object[$this->systab->current]->dialog)){ $dia = $this->systab->by_object[$this->systab->current]->dialog; if($dia === TRUE || is_object($dia)){ $dialog = TRUE; } - } - - if(isset($this->systab->by_object[$this->systab->current]->netConfigDNS) && + }elseif(isset($this->systab->by_object[$this->systab->current]->netConfigDNS) && $this->systab->by_object[$this->systab->current]->netConfigDNS->dialog){ $dialog = TRUE; } @@ -832,7 +834,7 @@ class systems extends plugin $display.= "

\n"; $display.= "\n"; $display.= " \n"; - if ($this->dn != "new"){ + if ($hide_apply){ $display.= "\n"; $display.= " \n"; } -- 2.30.2