Code

Updated Network
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 8 Apr 2008 13:58:59 +0000 (13:58 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 8 Apr 2008 13:58:59 +0000 (13:58 +0000)
-Display multiple IPhostNumbers.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10283 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/systems/admin/systems/class_termDNS.inc
gosa-plugins/systems/admin/systems/network.tpl

index a0925d884a9d1a0427d530c594d0987ffe30053a..f40e6d5d2f9892c5536b9442d4d641e33d3cbaf0 100644 (file)
@@ -30,8 +30,9 @@ class termDNS extends plugin
   var $attributes     = array("ipHostNumber","macAddress");
   var $objectclasses  = array("whatever");
 
-  var $ipHostNumber   = "";    // IP address 
-  var $macAddress     = "";    // Mac address 
+  var $ipHostNumber          = "";    // IP address 
+  var $additionalHostNumbers = array();
+  var $macAddress            = "";    // Mac address 
 
   var $orig_ipHostNumber   = "";    // IP address 
   var $orig_macAddress     = "";    // Mac address 
@@ -83,6 +84,13 @@ class termDNS extends plugin
       $this->cn = preg_replace("/\\\$\$/","",$this->attrs['cn'][0]);
     }
 
+
+    $this->additionalHostNumbers = array();
+    if(isset($this->attrs['ipHostNumber']) && $this->attrs['ipHostNumber']['count'] > 1){
+      for($i = 1 ; $i < $this->attrs['ipHostNumber']['count']; $i ++){
+        $this->additionalHostNumbers[] = $this->attrs['ipHostNumber'][$i];
+      }
+    }
  
     /************
      * DHCP 
@@ -243,6 +251,7 @@ class termDNS extends plugin
 
     $display= "";
 
+    $smarty->assign("additionalHostNumbers",$this->additionalHostNumbers);
     $smarty->assign("staticAddress", ""); 
  
     /* Check for autonet button */
@@ -406,6 +415,7 @@ class termDNS extends plugin
 
       $display.= $smarty->fetch(get_template_path('network.tpl', TRUE));
     }
+
     return($display);
   }
 
index d2461a82504bd9e6eae3f1f5215aba76c5f663af..6132c8a8f1fa746faca96700bdcf64b6eca29c50 100644 (file)
 {render acl=$ipHostNumberACL}
             <input     id="ipHostNumber"       name="ipHostNumber"     size=25 maxlength=80    value="{$ipHostNumber}">
 {/render}
+
+          {foreach from=$additionalHostNumbers item=item key=key}
+            <br>{$item}
+          {/foreach}
+
 {render acl=$ipHostNumberACL}
 {if $DNS_is_account == true}
       <input id="propose_ip" type="submit" name="propose_ip" value="{t}Propose ip{/t}" style="visibility:visible;">