Code

Just display dns and dhcp option if action type is initially_install
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 24 Aug 2007 11:21:30 +0000 (11:21 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 24 Aug 2007 11:21:30 +0000 (11:21 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7132 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/addons/gotomasses/class_goto_task.inc
plugins/addons/gotomasses/goto_task.tpl

index 43e72b2d2db51551e6c35a87c165aa5ce8405a70..47329033a1a9b4d0d453d8583997803db92b3f25 100644 (file)
@@ -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);
index 36779680c6376b3e37889d6648ef9fa2d814597f..2299d2bce0ed1716171174bd950f7fe68d4bbe2e 100644 (file)
@@ -29,6 +29,7 @@
                                                {/render}
                                        </td>
                                </tr>
+                               {if $Action == "initial_install"}
                                <tr>
                                        <td><input class='center' {if $configure_dns} checked {/if} id='configure_dns'
                                                type='checkbox' name='configure_dns' value='1' onClick="changeState('Zone');">
@@ -51,6 +52,7 @@
                                                </select>
                                        </td>
                                </tr>
+                               {/if}
                        </table>
                </td>
                <td style='vertical-align:top'>