From 8ceb068517a0c74b0e508dd03c708dc46ef7cb25 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 24 Aug 2007 11:20:48 +0000 Subject: [PATCH] Just display dns dhcp option when editing tasks of the type "initially_install" git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7131 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/addons/gotomasses/class_goto_task.inc | 37 ++++++++++--------- plugins/addons/gotomasses/goto_task.tpl | 2 + 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/plugins/addons/gotomasses/class_goto_task.inc b/plugins/addons/gotomasses/class_goto_task.inc index dc4652f3e..7372b11f2 100644 --- a/plugins/addons/gotomasses/class_goto_task.inc +++ b/plugins/addons/gotomasses/class_goto_task.inc @@ -342,24 +342,26 @@ class goto_task extends plugin { if(isset($_POST['goto_task_posted'])){ - if(isset($_POST['configure_dns'])){ - $this->configure_dns = TRUE; - if(isset($_POST['Zone'])){ - $this->Zone = get_post("Zone"); + if($this->Action == "initial_install"){ + if(isset($_POST['configure_dns'])){ + $this->configure_dns = TRUE; + if(isset($_POST['Zone'])){ + $this->Zone = get_post("Zone"); + } + }else{ + $this->Zone = "\"\""; + $this->configure_dns = FALSE; } - }else{ - $this->Zone = "\"\""; - $this->configure_dns = FALSE; - } - if(isset($_POST['configure_dhcp'])){ - $this->configure_dhcp = TRUE; - if(isset($_POST['Section'])){ - $this->Section = get_post("Section"); + if(isset($_POST['configure_dhcp'])){ + $this->configure_dhcp = TRUE; + if(isset($_POST['Section'])){ + $this->Section = get_post("Section"); + } + }else{ + $this->configure_dhcp = FALSE; + $this->Section = "\"\""; } - }else{ - $this->configure_dhcp = FALSE; - $this->Section = "\"\""; } foreach($this->attributes as $attr){ @@ -397,10 +399,11 @@ class goto_task extends plugin foreach($this->attributes as $attr){ $tmp[$attr] = $this->$attr; } - if(!$this->configure_dns){ + + if($this->Action != "initial_install" || !$this->configure_dns){ $tmp['Zone'] = "\"\""; } - if(!$this->configure_dhcp){ + if($this->Action != "initial_install" || !$this->configure_dhcp){ $tmp['Section'] = "\"\""; } return($tmp); diff --git a/plugins/addons/gotomasses/goto_task.tpl b/plugins/addons/gotomasses/goto_task.tpl index 8a4139e95..252a32c99 100644 --- a/plugins/addons/gotomasses/goto_task.tpl +++ b/plugins/addons/gotomasses/goto_task.tpl @@ -25,6 +25,7 @@ + {if $Action == "initial_install"} @@ -47,6 +48,7 @@ + {/if} -- 2.30.2