Code

Set DNS hidden if acount is disabled
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 28 Feb 2006 09:22:32 +0000 (09:22 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 28 Feb 2006 09:22:32 +0000 (09:22 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2761 594d385d-05f5-0310-b6e9-bd551577e9d8

html/include/focus.js
plugins/admin/systems/network.tpl

index 0924e26b7a4b3b9dbeaaa06d357cf9131dc7fb7f..1f226af15fea43bc6d11b5712881c486a1c895dc 100644 (file)
@@ -14,6 +14,7 @@ for (iln = 0; iln < len; iln++){
 }
 netscape= (ver.charAt(iln+1).toUpperCase() != "C");
 
+
 function keyPress(DnEvents) {
   // determines whether Netscape or Internet Explorer
   k = (netscape) ? DnEvents.keyCode : window.event.keyCode;
@@ -90,6 +91,14 @@ function changeState(myField) {
   document.getElementById(myField).disabled=(document.getElementById(myField).disabled)?false:true;
 }
 
+function setHidden(str) {
+       type = document.getElementById(str).style.display;
+       if((type=='')||(type=='block')) {
+               document.getElementById(str).style.display='none';
+       }else{
+               document.getElementById(str).style.display='block';
+       }
+}
 function changeSelectState(triggerField, myField) {
   if (document.getElementById(triggerField).value != 2){
          document.getElementById(myField).disabled= true;
index eb472e1f16205a46ab2b2ee71bd1866d7507d6a3..7c67cbaa6bdacd02a0f59f87a8a7c244bec8b16d 100644 (file)
@@ -19,6 +19,7 @@
       <input type="checkbox" name="enableDNS" value="1" 
         {if $DNSAccount==true}checked{/if}
         onClick="
+          setHidden('test2');
           changeState('zoneName');
           changeState('dNSTTL');
           changeState('AddNewRecord');
@@ -26,7 +27,8 @@
                 ">
       {t}Enable DNS for this device.{/t}
       <input type="submit" name="reloadThisDNSStuff" value="{t}Refresh{/t}">
-                       <table  summary="">
+    
+                       <table  summary="" id="test2">
                                <tr>
                                        <td><LABEL      for="zoneName">{t}Zone{/t}</LABEL></td>
                                        <td>
                                </tr>
                        </table>
                </td>
+       {if $DNSAccount != true}
+        <script language="javascript">
+        <!--
+          document.getElementById('test2').style.display='none';
+        -->
+        </script>
+       {/if}
     {/if}
+    
        </tr>
 </table>
 <input type="hidden" name="network_tpl_posted" value="1">
+
 <!--
 vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
 -->