Browse Source

Fix Add NS bug in /add/dns (#3292)

* Fix: Add extra DNS creating extra fields

js-add-ns was added twice in the link and the span before causing bubble effect triggering it twice

* Fix some Undefined variable error
Jaap Marcus 3 years ago
parent
commit
d84ecad204
2 changed files with 7 additions and 2 deletions
  1. 6 1
      web/add/dns/index.php
  2. 1 1
      web/templates/pages/add_dns.php

+ 6 - 1
web/add/dns/index.php

@@ -331,13 +331,18 @@ $v_template = $user_config[$user_plain]["DNS_TEMPLATE"];
 
 if (empty($_GET["domain"])) {
 	// Display body for dns domain
-
+	if (empty($v_domain)) {
+		$v_domain = "";
+	}
 	if (empty($v_ttl)) {
 		$v_ttl = 14400;
 	}
 	if (empty($v_exp)) {
 		$v_exp = date("Y-m-d", strtotime("+1 year"));
 	}
+	if (empty($v_dnssec)) {
+		$v_dnssec = "";
+	}
 	if (empty($v_ns1)) {
 		exec(HESTIA_CMD . "v-list-user-ns " . $user . " json", $output, $return_var);
 		$nameservers = json_decode(implode("", $output), true);

+ 1 - 1
web/templates/pages/add_dns.php

@@ -150,7 +150,7 @@
 						}
 					?>
 					<div class="u-pt18 js-add-ns" <?php if ($v_ns8) echo 'style="display:none;"'; ?>>
-						<span class="form-link js-add-ns"><?= _("Add one more Name Server") ?></span>
+						<span class="form-link"><?= _("Add one more Name Server") ?></span>
 					</div>
 				</div>
 			<?php } ?>