summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a8d2235)
raw | patch | inline | side by side (parent: a8d2235)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 13 Feb 2008 08:50:38 +0000 (08:50 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 13 Feb 2008 08:50:38 +0000 (08:50 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8884 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/systems/admin/systems/class_termDNS.inc | patch | blob | history | |
gosa-plugins/systems/admin/systems/network.tpl | patch | blob | history |
diff --git a/gosa-plugins/systems/admin/systems/class_termDNS.inc b/gosa-plugins/systems/admin/systems/class_termDNS.inc
index 36c0acb79f79358b8c151bed801a27e1613709f9..a231665c480e3c71f115c149b8c6ab7dab26e75e 100644 (file)
/* 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 */
$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'])){
}
/* 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);
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 7cb6b3ff996db6be15412e5e4c498a4fa82023d1..1685ee88d272ffaccd3d5834abca870219e4aa01 100644 (file)
<input id="ipHostNumber" name="ipHostNumber" size=25 maxlength=80 value="{$ipHostNumber}">
{/render}
{render acl=$ipHostNumberACL}
-{if $DNSAccount == true}
+{if $DNS_is_account == true}
<input id="propose_ip" type="submit" name="propose_ip" value="{t}Propose ip{/t}" style="visibility:visible;">
{else}
<input id="propose_ip" type="submit" name="propose_ip" value="{t}Propose ip{/t}" style="visibility:hidden;">
{/if}
</table>
</td>
- {if $DNS_is_account==true}
+ {if $DNSenabled==true}
<td style="width:50%;vertical-align:top;border-left:1px solid #b0b0b0;" valign="top">
{if $ZoneCnt}
- {if $DNSAccount == true}
+
+ {if $DNS_is_account == true}
<input type="checkbox" name="DNS_is_account" value="1"
checked="checked"
onclick="toggle('test2');
{t}Enable DNS for this device{/t}
<input type='image' src='images/list_reload.png' class='center' name="reloadThisDNSStuff" >
- {if $DNSAccount == true}
+ {if $DNS_is_account == true}
<div style="padding-left:20px;visibility:visible;" id="test2">
{else}
<div style="padding-left:20px;visibility:hidden;" id="test2">
<td><LABEL for="zoneName">{t}Zone{/t}</LABEL></td>
<td>
{render acl=$zoneNameACL}
- <select name="zoneName" id="zoneName" {if $DNSAccount == false} disabled {/if}>
+ <select name="zoneName" id="zoneName" {if $DNS_is_account == false} disabled {/if}>
{html_options values=$ZoneKeys output=$Zones selected=$zoneName}
</select>
{/render}
<td>{t}TTL{/t}</td>
<td>
{render acl=$dNSTTLACL}
- <input type="text" name="dNSTTL" value="{$dNSTTL}" id="dNSTTL" {if $DNSAccount == false} disabled {/if}>
+ <input type="text" name="dNSTTL" value="{$dNSTTL}" id="dNSTTL" {if $DNS_is_account == false} disabled {/if}>
{/render}
</td>
</tr>
</table>
</div>
{else}
- <input type="checkbox" name="dummy" value="1" disabled class='center'>
+ <input type="checkbox" name="dummy" value="1" disabled class='center' {if $DNS_is_account} checked {/if}>
{t}Enable DNS for this device{/t} ({t}not configured{/t})
<input type='image' src='images/list_reload.png' class='center'>
{/if}