From: hickert Date: Fri, 24 Aug 2007 11:21:30 +0000 (+0000) Subject: Just display dns and dhcp option if action type is initially_install X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3872f6be93f9699f4999dcee0cbb61eaec3fc211;p=gosa.git Just display dns and dhcp option if action type is initially_install git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7132 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/addons/gotomasses/class_goto_task.inc b/plugins/addons/gotomasses/class_goto_task.inc index 43e72b2d2..47329033a 100644 --- a/plugins/addons/gotomasses/class_goto_task.inc +++ b/plugins/addons/gotomasses/class_goto_task.inc @@ -349,24 +349,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 = "\"\""; } plugin::save_object(); } @@ -396,10 +398,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 36779680c..2299d2bce 100644 --- a/plugins/addons/gotomasses/goto_task.tpl +++ b/plugins/addons/gotomasses/goto_task.tpl @@ -29,6 +29,7 @@ {/render} + {if $Action == "initial_install"} @@ -51,6 +52,7 @@ + {/if}