diff --git a/includes/config.inc.php-dist b/includes/config.inc.php-dist
index 7f6a808..428a390 100644
--- a/includes/config.inc.php-dist
+++ b/includes/config.inc.php-dist
@@ -50,9 +50,9 @@ $templates[] = array(
$defaults['soa_edit'] = 'INCEPTION-INCREMENT';
$defaults['soa_edit_api'] = 'INCEPTION-INCREMENT';
$defaults['defaulttype'] = 'Master'; # Choose between 'Native' or 'Master'
-$defaults['primaryns'] = 'unconfigured.primaryns'; # The value of the first NS-record
-$defaults['secondaryns'] = 'unconfigured.secondaryns'; # The value of the second NS-record
-$defaults['ttl'] = 3600; # Default TTL for records
+$defaults['ns'][0] = 'unconfigured.primaryns'; # The value of the first NS-record
+$defaults['ns'][1] = 'unconfigured.secondaryns'; # The value of the second NS-record
+$defaults['ttl'] = 3600; # Default TTL for records
## UI Options
$menutype = 'horizontal'; # horizontal|vertical - use a horizontal or vertical menu
diff --git a/includes/misc.inc.php b/includes/misc.inc.php
index 358952a..88fe31d 100644
--- a/includes/misc.inc.php
+++ b/includes/misc.inc.php
@@ -31,6 +31,14 @@ if (!isset($authdb)) {
$blocklogin = TRUE;
}
+if (isset($defaults['primaryns'])) {
+ $errormsg = "You should reconfigure your \$defaults['primaryns'] settings to use \$defaults['ns'][0]. We converted if for you now.";
+ $defaults['ns'][] = $defaults['primaryns'];
+ if (isset($defaults['secondaryns'])) {
+ $defaults['ns'][] = $defaults['secondaryns'];
+ }
+}
+
/* No need to change stuf below */
if (function_exists('curl_init') === FALSE) {
diff --git a/index.php b/index.php
index 656863b..db0d933 100644
--- a/index.php
+++ b/index.php
@@ -453,23 +453,21 @@ $(document).ready(function () {
edit: false,
inputClass: 'template'
},
- nameserver1: {
- title: 'Pri. Nameserver',
+ nameserver: {
+ title: 'Nameservers',
create: true,
list: false,
edit: false,
input: function(data) {
var $template = data.form.find('#Edit-template');
- var $elem = $('');
- $elem.val();
+ var ns_form = ' '; ?>';
+ var $elem = $('