From eeeb863fb9d9051e9661b8e371c11db0ab840cd1 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 13 Feb 2008 08:50:38 +0000 Subject: [PATCH] Updated Network settings. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8884 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systems/admin/systems/class_termDNS.inc | 16 +++++++++++----- gosa-plugins/systems/admin/systems/network.tpl | 15 ++++++++------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/gosa-plugins/systems/admin/systems/class_termDNS.inc b/gosa-plugins/systems/admin/systems/class_termDNS.inc index 36c0acb79..a231665c4 100644 --- a/gosa-plugins/systems/admin/systems/class_termDNS.inc +++ b/gosa-plugins/systems/admin/systems/class_termDNS.inc @@ -287,10 +287,12 @@ class termDNS extends plugin /* There is no dns available */ + $smarty->assign("DNS_is_account",$this->DNS_is_account); + $smarty->assign("DNSenabled",$this->DNSenabled); if($this->DNSenabled == false){ /* Is IP address must ? */ - $smarty->assign("DNS_is_account",false); +# $smarty->assign("DNS_is_account",false); $smarty->assign("IPisMust",(($this->IPisMust)||($this->DNS_is_account))); /* Assign smarty all non DNs attributes */ @@ -301,7 +303,7 @@ class termDNS extends plugin $display.= $smarty->fetch(get_template_path('network.tpl', TRUE)); }else{ - $smarty->assign("DNS_is_account",true); + # $smarty->assign("DNS_is_account",true); /* Add new empty array to our record list */ if(isset($_POST['AddNewRecord'])){ @@ -349,7 +351,7 @@ class termDNS extends plugin } /* Assign all needed vars */ - $smarty->assign("DNSAccount",$this->DNS_is_account); + # $smarty->assign("DNSAccount",$this->DNS_is_account); $smarty->assign("hide_dns_check_box",$this->hide_dns_check_box); $smarty->assign("Zones",$this->Zones); @@ -1003,8 +1005,12 @@ class termDNS extends plugin function force_dns() { if($this->DNSenabled){ - $this->DNS_is_account = TRUE; - $this->hide_dns_check_box = TRUE; + + /* Only force DNS account, if we have at least on dns Zone */ + if(count($this->Zones)){ + $this->DNS_is_account = TRUE; + $this->hide_dns_check_box = TRUE; + } } } } diff --git a/gosa-plugins/systems/admin/systems/network.tpl b/gosa-plugins/systems/admin/systems/network.tpl index 7cb6b3ff9..1685ee88d 100644 --- a/gosa-plugins/systems/admin/systems/network.tpl +++ b/gosa-plugins/systems/admin/systems/network.tpl @@ -12,7 +12,7 @@ {/render} {render acl=$ipHostNumberACL} -{if $DNSAccount == true} +{if $DNS_is_account == true} {else} @@ -74,11 +74,12 @@ {/if} - {if $DNS_is_account==true} + {if $DNSenabled==true} {if $ZoneCnt} - {if $DNSAccount == true} + + {if $DNS_is_account == true} - {if $DNSAccount == true} + {if $DNS_is_account == true}
{else} {else} - + {t}Enable DNS for this device{/t} ({t}not configured{/t}) {/if} -- 2.30.2