diff --git a/DnsServerCore/www/js/zone.js b/DnsServerCore/www/js/zone.js index 28f7c80c..eff29f1d 100644 --- a/DnsServerCore/www/js/zone.js +++ b/DnsServerCore/www/js/zone.js @@ -62,6 +62,11 @@ $(function () { } }); + $("#chkAddEditRecordDataPtr").click(function () { + var addPtrRecord = $("#chkAddEditRecordDataPtr").prop('checked'); + $("#chkAddEditRecordDataCreatePtrZone").prop('disabled', !addPtrRecord); + }); + $("input[type=radio][name=rdAddEditRecordDataForwarderProtocol]").change(updateAddEditFormForwarderPlaceholder); }); @@ -639,6 +644,7 @@ function clearAddEditForm() { $("#txtAddEditRecordDataValue").val(""); $("#divAddEditRecordDataPtr").show(); $("#chkAddEditRecordDataPtr").prop("checked", false); + $("#chkAddEditRecordDataCreatePtrZone").prop('disabled', true); $("#chkAddEditRecordDataCreatePtrZone").prop("checked", false); $("#chkAddEditRecordDataPtrLabel").text("Add reverse (PTR) record"); @@ -725,6 +731,7 @@ function modifyAddRecordForm() { $("#lblAddEditRecordDataValue").text("IPv4 Address"); $("#txtAddEditRecordDataValue").val(""); $("#chkAddEditRecordDataPtr").prop("checked", false); + $("#chkAddEditRecordDataCreatePtrZone").prop('disabled', true); $("#chkAddEditRecordDataCreatePtrZone").prop("checked", false); $("#chkAddEditRecordDataPtrLabel").text("Add reverse (PTR) record"); $("#divAddEditRecordData").show(); @@ -735,6 +742,7 @@ function modifyAddRecordForm() { $("#lblAddEditRecordDataValue").text("IPv6 Address"); $("#txtAddEditRecordDataValue").val(""); $("#chkAddEditRecordDataPtr").prop("checked", false); + $("#chkAddEditRecordDataCreatePtrZone").prop('disabled', true); $("#chkAddEditRecordDataCreatePtrZone").prop("checked", false); $("#chkAddEditRecordDataPtrLabel").text("Add reverse (PTR) record"); $("#divAddEditRecordData").show(); @@ -1098,6 +1106,7 @@ function showEditRecordModal(objBtn) { case "AAAA": $("#txtAddEditRecordDataValue").val(divData.attr("data-record-value")); $("#chkAddEditRecordDataPtr").prop("checked", false); + $("#chkAddEditRecordDataCreatePtrZone").prop('disabled', true); $("#chkAddEditRecordDataCreatePtrZone").prop("checked", false); $("#chkAddEditRecordDataPtrLabel").text("Update reverse (PTR) record"); break;