Code

Updated network handling for DNS
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 13 Sep 2010 08:01:19 +0000 (08:01 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 13 Sep 2010 08:01:19 +0000 (08:01 +0000)
- The 'Add record' button wasn't visible while neabling dns via JavaScript.

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

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

index f6ddf4f6bb5ad87a2f99a0a92b26161a35854e3f..022d92d2516ff8f817e9b018430418a84f1aea51 100644 (file)
@@ -947,12 +947,6 @@ class termDNS extends plugin
   function generateRecordsList()
   {
     $changeStateForRecords = "";
-    
-    if(!$this->DNS_is_account) {
-      $str = "<input type='submit' value='"._("Add")."' name='AddNewRecord' id='AddNewRecord' disabled='disabled'>";
-      return(array("str" => $str, "changeStateForRecords"=> ""));
-    }
     $str = "<table summary='' width='100%'>";
     foreach($this->dnsEntry['RECORDS'] as $key => $entry){
 
index 02db2394a9cfb28da80aac15a8ba736d94df87d3..16bde90f17dec00abaffe659e959ed235a77bfe2 100644 (file)
                <td     style="width:50%;vertical-align:top;border-left:1px solid #b0b0b0;" valign="top">
 
     {if $ZoneCnt}
-      
-{render acl=$dnsSetupACL}
-      {if $DNS_is_account == true}
-      {if $hide_dns_check_box} 
-        <input type="hidden" name="DNS_is_account" value="1"  
-        <input type="checkbox" name="dummy" value="1" disabled
 
-      {else}
-        <input type="checkbox" name="DNS_is_account" value="1"  
-      {/if}
+        {render acl=$dnsSetupACL}
+              {if $DNS_is_account == true}
 
+              {if $hide_dns_check_box}
+                <input type="hidden" name="DNS_is_account" value="1">
+                <input type="checkbox" name="dummy" value="1" disabled
+                    checked="checked" />
+              {else}
+                <input type="checkbox" name="DNS_is_account" value="1"
+                    checked="checked" onclick="$('test2').toggle(); $('propose_ip').toggle();"/>
+              {/if}
+
+                {else}
+              <input type="checkbox" name="DNS_is_account" value="1"
+                onclick="
+                  $('test2').toggle();
+                  $('propose_ip').toggle();
+                  "/>
+                {/if}
+        {/render}
 
-        checked="checked"
-        onclick="
-          $('test2').toggle();
-          changeState('zoneName');
-          changeState('dNSTTL');
-          $('propose_ip').toggle();
-          changeState('AddNewRecord');
-          {$changeStateForRecords}"/>
-        {else}
-      <input type="checkbox" name="DNS_is_account" value="1"  
-        onclick="$('test2').toggle();
-          changeState('zoneName');
-          changeState('dNSTTL');
-          $('propose_ip').toggle();
-          changeState('AddNewRecord');"/>
-        {/if}
-{/render}
       {t}Enable DNS for this device{/t}
       <input type='image' src='images/lists/reload.png' class='center' name="reloadThisDNSStuff" >
       {if $DNS_is_account == true}
                                        <td><LABEL      for="zoneName">{t}Zone{/t}</LABEL></td>
                                        <td>
 {render acl=$dnsSetupACL}
-              <select name="zoneName" id="zoneName" {if $DNS_is_account == false} disabled {/if}>
+              <select name="zoneName" id="zoneName">
                 {html_options values=$ZoneKeys output=$Zones selected=$zoneName}
               </select>
 {/render}
           <td>{t}TTL{/t}</td>
           <td>
 {render acl=$dnsSetupACL}
-            <input type="text" name="dNSTTL" value="{$dNSTTL}" id="dNSTTL" {if $DNS_is_account == false} disabled {/if}>
+            <input type="text" name="dNSTTL" value="{$dNSTTL}" id="dNSTTL" >
 {/render}
           </td>
         </tr>
         <tr>
           <td valign="top">{t}Dns records{/t}</td>
           <td>
-            {if $DNS_is_account == true}
 {render acl=$dnsSetupACL}
               {$records}
 {/render}
-            {/if}
           </td>
                                </tr>
                        </table>