webapp: added Create reverse zone for PTR record option.

This commit is contained in:
Shreyas Zare
2020-10-17 18:27:36 +05:30
parent ba49d8a447
commit 101080a050
2 changed files with 12 additions and 2 deletions

View File

@@ -1620,6 +1620,12 @@
<input id="chkAddEditRecordDataPtr" type="checkbox"> <span id="chkAddEditRecordDataPtrLabel">Add reverse (PTR) record</span>
</label>
</div>
<div class="checkbox">
<label>
<input id="chkAddEditRecordDataCreatePtrZone" type="checkbox"> Create reverse zone for PTR record
</label>
</div>
</div>
</div>
</div>

View File

@@ -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":