summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 13a0a42)
raw | patch | inline | side by side (parent: 13a0a42)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 27 Feb 2006 10:50:00 +0000 (10:50 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 27 Feb 2006 10:50:00 +0000 (10:50 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2746 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_termDNS.inc | patch | blob | history | |
plugins/admin/systems/network.tpl | patch | blob | history |
index 59facba570f96070772da4a3bf31086d9ea801d8..f0c8d3295382edcfa6973a1bfc66832835450e06 100644 (file)
var $IPisMust = false;
var $MACisMust= false;
+ var $found = false;
+
function termDNS ($config, $dn,$objectClasses,$IPisMust = false)
{
/* We need to know which objectClasses are used, to store the ip/mac*/
$this->orig_dn= $dn;
$this->IPisMust = $IPisMust;
+
+ /* Hide all dns specific code, if dns is not available
+ */
+ $found = false;
+ foreach($this->config->data['TABS']['SERVTABS'] as $tab){
+ if(preg_match("/^servdns$/",$tab['CLASS'])){
+ $found = true;
+ }
+ }
+ $this->found = $found;
+ if(!$this->found){
+ $this->DNS_is_account = false;
+ return;
+ }
+
/* All types with required attrs */
$this->RecordTypes['aRecord'] = "aRecord"; // ok
/* Call parent execute */
$smarty= get_smarty();
$display= "";
+
+ /* There is no dns available
+ */
+ if($this->found == false){
+
+ $smarty->assign("DNS_is_account",false);
+ $smarty->assign("IPisMust",(($this->IPisMust)||($this->DNS_is_account)));
+
+ /* Assign smarty all non DNs attributes */
+ foreach($this->attributes as $attr){
+ $smarty->assign($attr,$this->$attr);
+ }
+ $display.= $smarty->fetch(get_template_path('network.tpl', TRUE));
+ return($display);
+ }else{
+ $smarty->assign("DNS_is_account",true);
+ }
+
/* Add new empty array with status new, to our record list */
if(isset($_POST['AddNewRecord'])){
$this->types[] =array("type"=>"aRecord","value"=>"","status"=>"new");
index d21860cf8e48836d2f99a32d3950ca673a8227f4..eb472e1f16205a46ab2b2ee71bd1866d7507d6a3 100644 (file)
</tr>
</table>
</td>
+ {if $DNS_is_account==true}
<td style="width:50%">
<input type="checkbox" name="enableDNS" value="1"
{if $DNSAccount==true}checked{/if}
</tr>
</table>
</td>
+ {/if}
</tr>
</table>
<input type="hidden" name="network_tpl_posted" value="1">