Code

Just display dns dhcp option when editing tasks of the type "initially_install"
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 24 Aug 2007 11:20:48 +0000 (11:20 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 24 Aug 2007 11:20:48 +0000 (11:20 +0000)
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
plugins/addons/gotomasses/goto_task.tpl

index dc4652f3e1746197261ee6304e56748120df463a..7372b11f2f80eacadb2dec7a3975ba678169866c 100644 (file)
@@ -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);
index 8a4139e95c36bfb91794ad0371904cc6c7f0c069..252a32c99dd6741751163db8289e759d5e0de978 100644 (file)
@@ -25,6 +25,7 @@
                                                </select>
                                        </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');">
@@ -47,6 +48,7 @@
                                                </select>
                                        </td>
                                </tr>
+                               {/if}
                        </table>
                </td>
                <td style='vertical-align:top'>