Code

Made DNS and DHCP plugins configurable via setup
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 14 Aug 2007 10:52:00 +0000 (10:52 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 14 Aug 2007 10:52:00 +0000 (10:52 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7058 594d385d-05f5-0310-b6e9-bd551577e9d8

contrib/gosa.conf
setup/class_setupStep_Config2.inc
setup/setup_config2.tpl

index 191e2fd9ccc2f4aab7186cccc44d8b1206e63f4f..82abc69a15c371098f54a8b340e2ec5c3e2cb756 100644 (file)
           <tab class="faiSummaryTab" name="FAI summary" />
 {else}
 <!--   <tab class="faiSummaryTab" name="FAI summary" /> -->
+{/if}
+{if $cv.generic_settings.enableDNS}
+          <tab class="servdns" name="DNS" />
+{else}
+<!--   <tab class="servdns" name="DNS" /> -->
+{/if}
+{if $cv.generic_settings.enableDHCP}
+          <tab class="servdhcp" name="DHCP" />
+{else}
+<!--   <tab class="servdhcp" name="DHCP" /> -->
 {/if}
           <tab class="terminfo" name="Information" />
           <tab class="glpiAccount" name="Inventory" />
index 18cebe586e8669c2a32787044c603b4eb3d3305c..3207b220022695bce46dc54dd2c1318398404488 100644 (file)
@@ -32,9 +32,12 @@ class Step_Config2 extends setup_step
   var $mail_settings = array("vacationdir"        => "/etc/gosa/vacation",
                              "vacationdir_active" => FALSE);
 
-  var $generic_settings  = array( "enableCopyPaste" => false,
-                                  "wws_ou"        => "ou=winstations",
-                                  "wws_ou_active" => FALSE);
+  var $generic_settings  = array( 
+                                  "enableCopyPaste" => false,
+                                  "enableDNS"      => false,
+                                  "enableDHCP"      => false,
+                                  "wws_ou"          => "ou=winstations",
+                                  "wws_ou_active"   => FALSE);
 
   var $samba_settings    = array( "samba_sid"        => "0-815-4711",
                                   "samba_sid_active" => FALSE,
@@ -117,6 +120,14 @@ class Step_Config2 extends setup_step
 #        $this->enableFAI_management = TRUE;
       }
 
+      if(is_array($tmp) && isset($tmp['dhcpClass'])){
+        $this->generic_settings['enableDHCP'] = TRUE;
+      }
+
+      if(is_array($tmp) && isset($tmp['dNSZone'])){
+        $this->generic_settings['enableDNS'] = TRUE;
+      }
+
       $this->called = TRUE;
     }
 
@@ -163,6 +174,12 @@ class Step_Config2 extends setup_step
       if(isset($_POST['enableCopyPaste'])){
         $this->generic_settings['enableCopyPaste'] = get_post('enableCopyPaste');
       }
+      if(isset($_POST['enableDNS'])){
+        $this->generic_settings['enableDNS'] = get_post('enableDNS');
+      }
+      if(isset($_POST['enableDHCP'])){
+        $this->generic_settings['enableDHCP'] = get_post('enableDHCP');
+      }
 
       if(isset($_POST['wws_ou_active'])){
         $this->generic_settings['wws_ou_active'] = TRUE;
index dd9368cd7469e0841913213d40372105a935d5ba..23345c576e6680b4d85cb974096a297e7283982e 100644 (file)
         </div>
     </div>
 
+       <div class='step4_container'>
+        <div class='step4_name'>
+            {t}Enable DNS extension{/t}
+        </div>
+        <div class='step4_value'>
+
+            <select name="enableDNS" size="1" title="">
+                {html_options options=$bool selected=$generic_settings.enableDNS}
+            </select>
+        </div>
+    </div>
+
+       <div class='step4_container'>
+        <div class='step4_name'>
+            {t}Enable DHCP extension{/t}
+        </div>
+        <div class='step4_value'>
+
+            <select name="enableDHCP" size="1" title="">
+                {html_options options=$bool selected=$generic_settings.enableDHCP}
+            </select>
+        </div>
+    </div>
+
        <div class='step4_container'>
         <div class='step4_name'>
             {t}Enable FAI release management{/t}