Code

Updated must dectection for macAddress
[gosa.git] / gosa-plugins / systems / admin / systems / network.tpl
index 6401258e4b6d613a67a362905f118202be5b6511..8f622e3acd999795b5484ef5ae79fc34a386f609 100644 (file)
@@ -6,10 +6,10 @@
                <td     style="width:50%; vertical-align: top;">
                        <table  summary="">
                                <tr>
-                                       <td style='vertical-align:top;'><LABEL  for="ipHostNumber">{t}IP-address{/t}{if $IPisMust}{$staticAddress}{/if}</LABEL></td>
+                                       <td style='vertical-align:top;'><LABEL  for="ipHostNumber">{t}IP-address{/t}{if $IPisMust}{$must}{/if}</LABEL></td>
                                        <td>
 {render acl=$ipHostNumberACL}
-            <input     id="ipHostNumber"       name="ipHostNumber"     size=25 maxlength=80    value="{$ipHostNumber}">
+            <input     type='text' id="ipHostNumber"   name="ipHostNumber"     size=25 maxlength=80    value="{$ipHostNumber}">
 {/render}
           {foreach from=$additionalHostNumbers item=item key=key}
             <br>
 
 {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;">
+      <input id="propose_ip" type="submit" name="propose_ip" value="{t}Propose ip{/t}">
       {else}
-      <input id="propose_ip" type="submit" name="propose_ip" value="{t}Propose ip{/t}" style="visibility:hidden;">
+      <input id="propose_ip" type="submit" name="propose_ip" value="{t}Propose ip{/t}" style="display: none;">
       {/if}
 {/render}
           </td>
                                </tr>
                                <tr>
-                                       <td><LABEL      for="macAddress">{t}MAC-address{/t}</LABEL>{$staticAddress}</td>
+                                       <td><LABEL      for="macAddress">{t}MAC-address{/t}</LABEL>{if $MACisMust}{$must}{/if}</td>
                                        <td>
 {render acl=$macAddressACL}
-            <input     name="macAddress"       id="macAddress" size=25 maxlength=80    value="{$macAddress}">
+            <input     type='text' name="macAddress"   id="macAddress" size=25 maxlength=80    value="{$macAddress}">
 {/render}
 
 {render acl=$autonetACL}
                <td     style="width:50%;vertical-align:top;border-left:1px solid #b0b0b0;" valign="top">
 
     {if $ZoneCnt}
-      
-{render acl=$dnsSetupACL}
-      {if $DNS_is_account == true}
-      <input type="checkbox" name="DNS_is_account" value="1"  
-        checked="checked"
-        onclick="toggle('test2');
-          changeState('zoneName');
-          changeState('dNSTTL');
-          toggle('propose_ip');
-          changeState('AddNewRecord');
-          {$changeStateForRecords}"/>
-        {else}
-      <input type="checkbox" name="DNS_is_account" value="1"  
-        onclick="toggle('test2');
-          changeState('zoneName');
-          changeState('dNSTTL');
-          toggle('propose_ip');
-          changeState('AddNewRecord');"/>
-        {/if}
-{/render}
+
+        {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}
+
       {t}Enable DNS for this device{/t}
       <input type='image' src='images/lists/reload.png' class='center' name="reloadThisDNSStuff" >
       {if $DNS_is_account == true}
-      <div style="padding-left:20px;visibility:visible;" id="test2">
+      <div style="padding-left:20px" id="test2">
       {else}
-      <div style="padding-left:20px;visibility:hidden;" id="test2">
+      <div style="padding-left:20px;display: none;" id="test2">
       {/if}
                        <table summary="">
                                <tr>
                                        <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>