From 101080a05004cc86ba63ab4c1b39759581c207c8 Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sat, 17 Oct 2020 18:27:36 +0530 Subject: [PATCH] webapp: added `Create reverse zone for PTR record` option. --- DnsServerCore/www/index.html | 6 ++++++ DnsServerCore/www/js/zone.js | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/DnsServerCore/www/index.html b/DnsServerCore/www/index.html index 8cd8be1d..dd652e7b 100644 --- a/DnsServerCore/www/index.html +++ b/DnsServerCore/www/index.html @@ -1620,6 +1620,12 @@ Add reverse (PTR) record + +
+ +
diff --git a/DnsServerCore/www/js/zone.js b/DnsServerCore/www/js/zone.js index 9b632464..28f7c80c 100644 --- a/DnsServerCore/www/js/zone.js +++ b/DnsServerCore/www/js/zone.js @@ -639,6 +639,7 @@ function clearAddEditForm() { $("#txtAddEditRecordDataValue").val(""); $("#divAddEditRecordDataPtr").show(); $("#chkAddEditRecordDataPtr").prop("checked", false); + $("#chkAddEditRecordDataCreatePtrZone").prop("checked", false); $("#chkAddEditRecordDataPtrLabel").text("Add reverse (PTR) record"); $("#divAddEditRecordDataNs").hide(); @@ -724,6 +725,7 @@ function modifyAddRecordForm() { $("#lblAddEditRecordDataValue").text("IPv4 Address"); $("#txtAddEditRecordDataValue").val(""); $("#chkAddEditRecordDataPtr").prop("checked", false); + $("#chkAddEditRecordDataCreatePtrZone").prop("checked", false); $("#chkAddEditRecordDataPtrLabel").text("Add reverse (PTR) record"); $("#divAddEditRecordData").show(); $("#divAddEditRecordDataPtr").show(); @@ -733,6 +735,7 @@ function modifyAddRecordForm() { $("#lblAddEditRecordDataValue").text("IPv6 Address"); $("#txtAddEditRecordDataValue").val(""); $("#chkAddEditRecordDataPtr").prop("checked", false); + $("#chkAddEditRecordDataCreatePtrZone").prop("checked", false); $("#chkAddEditRecordDataPtrLabel").text("Add reverse (PTR) record"); $("#divAddEditRecordData").show(); $("#divAddEditRecordDataPtr").show(); @@ -843,7 +846,7 @@ function addRecord() { return; } - apiUrl += "&value=" + encodeURIComponent(value) + "&ptr=" + $("#chkAddEditRecordDataPtr").prop('checked'); + apiUrl += "&value=" + encodeURIComponent(value) + "&ptr=" + $("#chkAddEditRecordDataPtr").prop('checked') + "&createPtrZone=" + $("#chkAddEditRecordDataCreatePtrZone").prop('checked'); break; case "PTR": @@ -1095,6 +1098,7 @@ function showEditRecordModal(objBtn) { case "AAAA": $("#txtAddEditRecordDataValue").val(divData.attr("data-record-value")); $("#chkAddEditRecordDataPtr").prop("checked", false); + $("#chkAddEditRecordDataCreatePtrZone").prop("checked", false); $("#chkAddEditRecordDataPtrLabel").text("Update reverse (PTR) record"); break; @@ -1242,7 +1246,7 @@ function updateRecord() { return; } - apiUrl += "&newValue=" + encodeURIComponent(newValue) + "&ptr=" + $("#chkAddEditRecordDataPtr").prop('checked'); + apiUrl += "&newValue=" + encodeURIComponent(newValue) + "&ptr=" + $("#chkAddEditRecordDataPtr").prop('checked') + "&createPtrZone=" + $("#chkAddEditRecordDataCreatePtrZone").prop('checked'); break; case "PTR":