diff --git a/plugins/admin/systems/class_servDNSeditZoneEntries.inc b/plugins/admin/systems/class_servDNSeditZoneEntries.inc
index fc4d86ff83faa52fd81813ac7d8fd6face368420..3a13bde7dbfac17fc1f0b18238cb336979970ad1 100644 (file)
$this->Devices[$attrs['relativeDomainName'][0]]['OrigCn'] = $attrs['relativeDomainName'][0];
}
- if(!count($this->Devices)){
- $this->disableDialog = true;
+ $ldap->cat($this->dn,array("objectClass"));
+
+ $this->disableDialog = true;
+ if(count($this->Devices)|| $ldap->count()){
+ $this->disableDialog = false;
}
}
/* Add new host entry
*/
- if((preg_match("/^UserRecord_/",$name)) && ($once)){
+ if((preg_match("/^UserRecord_?/",$name)) && ($once)){
$once = false;
$entry = getDNSHostEntries($this->config,"",true);
$entry['exists'] = true;
$entry['zoneName'] = $this->zoneName;
$entry['RECORDS'][] = array("type" => "aRecord" , "value"=>"");
- $this->Devices['New Entry'] = $entry;
+ $this->Devices[_("New entry")] = $entry;
}
if(count($tmp2) != 2) continue;
/* Set title
*/
- $str = "<h3>".sprintf(_("Settings for '%s'"),$objKey)." : </h3>";
+ $str= "<br>";
$hostNameOnce = true;
*/
$name = base64_encode($objKey)."|".$id;
- $str .= "<tr><td style='width:80px;'>\n";
+ $str .= "<tr><td style='width:170px;'>\n";
/* Only first host entry name should be editable
*/
if($hostNameOnce){
$hostNameOnce = false;
$str .="<input type='text' name='RenameHost_".$name."' value='".$objectName."'>\n";
- }else{
- $str .=$objectName;
- }
+ }
/* Create rest. Selectbox, icons ...
*/
$str .="
</td>
- <td style='width:80px;'>
+ <td style='width:90px;'>
".$this->createRecordTypeSelection($record['type'],$name)."
</td>
<td>
<input type='text' value='".$record['value']."' name='ValueSelection_".$name."' style='width:250px;'>
</td>
<td style='width:50px;text-align:right;'>
- <input type='image' name='AddRecord_".$name."' src='images/crossref.png' alt='"._("Add")."' title='"._("Add")."'>
+ <input type='image' name='AddRecord_".$name."' src='images/list_new.png' alt='"._("Add")."' title='"._("Add")."'>
<input type='image' name='RemoveRecord_".$name."' src='images/edittrash.png' alt='"._("Remove")."' title='"._("Remove")."'>
</td>
</tr>";