Code

Updated network settings
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 10 Apr 2008 10:13:41 +0000 (10:13 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 10 Apr 2008 10:13:41 +0000 (10:13 +0000)
-Added graphical buttons

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

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

index 8a9d47998eb06fc38bf15739273483a5ccee8539..06cb3ada7f8cd9242a017dd163edbc679aca2787 100644 (file)
@@ -257,20 +257,22 @@ class termDNS extends plugin
      **********/
       
     /* Add a new one */
-    if(isset($_POST['additionalHostNumbers_add'])){
-      if(!is_array($this->additionalHostNumbers)){
-        $this->additionalHostNumbers=array();
+    foreach($_POST as $name => $value){
+      if(preg_match("/^additionalHostNumbers_add/",$name)){
+        $this->additionalHostNumbers[] = "";
+        break;
       }
-      $this->additionalHostNumbers[] = "";
+    
+      /* Delete given entry */
+      if(preg_match("/^additionalHostNumbers_del_/",$name)){
+        $id = preg_replace("/^^additionalHostNumbers_del_([0-9]*)_.*/","\\1",$name);
+        if(isset($this->additionalHostNumbers[$id])){
+          unset($this->additionalHostNumbers[$id]);
+          $this->additionalHostNumbers = array_values($this->additionalHostNumbers);
+        }
+        break;
+      } 
     }
-
-    /* Delete given entry */
-    foreach($this->additionalHostNumbers as $id => $value){
-      if(isset($_POST['additionalHostNumbers_del_'.$id])){
-        unset($this->additionalHostNumbers[$id]);
-        $this->additionalHostNumbers = array_values($this->additionalHostNumbers);
-      }
-    } 
  
     $smarty->assign("additionalHostNumbers",$this->additionalHostNumbers);
     $smarty->assign("staticAddress", ""); 
index f1f309dc076921399e4e201fa472462d032cbe6d..e637352371054b3a76f9da35739c6ba7ef70230e 100644 (file)
@@ -14,9 +14,9 @@
           {foreach from=$additionalHostNumbers item=item key=key}
             <br>
             <input size=25 maxlength=80 type='text' name='additionalHostNumbers_{$key}' value='{$item}'>
-            <input type='submit' name='additionalHostNumbers_del_{$key}' value='{msgPool type=delButton}'>
+            <input type='image' class='center' name='additionalHostNumbers_del_{$key}' src='images/edittrash.png' alt='{msgPool type=delButton}'>
           {/foreach}
-          <input type='submit' name='additionalHostNumbers_add' value='{msgPool type=addButton}'>
+          <input type='image' class='center' name='additionalHostNumbers_add}' src='images/list_new.png' alt='{msgPool type=addButton}'>
 
 {render acl=$ipHostNumberACL}
 {if $DNS_is_account == true}