Code

Updated hhcp and dns client setup.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 4 Sep 2007 06:34:08 +0000 (06:34 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 4 Sep 2007 06:34:08 +0000 (06:34 +0000)
Grey out not available options.

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

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

index 7b31ebf078d8de983df8879b2c68e196f0ec0cdf..93f850f17fcbb349ee8c9e09025a44cc54cd2ae7 100644 (file)
@@ -256,6 +256,8 @@ class termDNS extends plugin
     $smarty->assign("dhcp_is_Account",$this->dhcp_is_Account);
     $smarty->assign("dhcpParentNode", $this->dhcpParentNode);
     $smarty->assign("dhcpParentNodes",$this->dhcpParentNodes);
+    $smarty->assign("dhcpParentNodeCnt",count($this->dhcpParentNodes));
+
 
     /* There is no dns available
      */
@@ -313,6 +315,7 @@ class termDNS extends plugin
       /* Assign all needed vars */
       $smarty->assign("DNSAccount",$this->DNS_is_account);
       $smarty->assign("Zones",$this->Zones);
+      $smarty->assign("ZoneCnt",count($this->Zones));
       $smarty->assign("ZoneKeys",($this->Zones));
       $smarty->assign("IPisMust",(($this->IPisMust)||($this->DNS_is_account)));
 
index ec5d17c93bd89dd360a3e1426a7fce66c7374d9e..9527e32dddcc16111b982af3b97b336e7b4d0c03 100644 (file)
@@ -29,6 +29,7 @@
         <tr>
           <td colspan=2 style='padding-top:12px;'>
             <table>
+              {if $dhcpParentNodeCnt}
               <tr>
                 <td>
                   <input onClick='document.mainform.submit();'
                   <input type='image' src='images/list_reload.png' class='center'>
                 </td>
               </tr>
+              {else}
+              <tr>
+                <td>
+                  <input type='checkbox' name='dummy' class='center' disabled>
+                  {t}Enable DHCP for this device{/t}
+                  <input type='image' src='images/list_reload.png' class='center'><br>
+                  <i>{t}No dhcp service present in your ldap database, you will have to setup the dhcp service first.{/t}</i>
+                </td>
+              </tr>
+              {/if}
               {if $dhcp_is_Account}
               <tr>
                 <td>&nbsp;</td>
                                </tr>
                        </table>
       </div>
+    {else}        
+      <input type="checkbox" name="dummy" value="1" disabled class='center'>
+      {t}Enable DNS for this device{/t}
+      <input type='image' src='images/list_reload.png' class='center'><br>
+      <i>{t}No dns service present in your ldap database, you will have to setup the dns service first.{/t}</i>
+    {/if}
+
                </td>
     {/if}