diff --git a/plugins/admin/systems/class_terminalGeneric.inc b/plugins/admin/systems/class_terminalGeneric.inc
index 72d81633dad2746dc01789a34f6f2b04ed2335fb..f129061de5e9610d6aa45e04810c3a156d14c82c 100644 (file)
function termgeneric (&$config, $dn= NULL, $parent= NULL)
{
/* Check if FAI is activated */
- $tmp= $config->search("faiManagement", "CLASS",array('tabs'));
+ $tmp= $config->search("faiManagement", "CLASS",array('menu','tabs'));
if(!empty($tmp)){
$this->fai_activated = TRUE;
}
$smarty->assign("member_of_ogroup",$this->member_of_ogroup);
/* Show main page */
- $smarty->assign("netconfig", $this->netConfigDNS->execute());
+ $str = $this->netConfigDNS->execute();
+ if(is_object($this->netConfigDNS->dialog)){
+ return($str);
+ }
+ $smarty->assign("netconfig", $str);
return($smarty->fetch (get_template_path('terminal.tpl', TRUE)));
}
$message[]= _("The required field 'Terminal name' is not set.");
}
+ /* Check if given name is a valid host/dns name */
+ if(!is_dns_name($this->cn) ){
+ $message[] = _("Please specify a valid name for this object.");
+ }
+
if ($this->orig_dn == 'new'){
$ldap= $this->config->get_ldap_link();
$ldap->cd ($this->base);