mirror of
https://github.com/loewexy/pdnsmanager.git
synced 2025-01-15 18:52:20 +01:00
Set default record type to PTR if a reverse zone is detected.
This commit is contained in:
parent
058cafb6d7
commit
00c3a32de8
1 changed files with 9 additions and 0 deletions
|
@ -339,11 +339,20 @@ function requestDomainName() {
|
|||
$('#domain-name').text(data.name);
|
||||
$('#add-domain-name').text("." + data.name);
|
||||
domainName = data.name;
|
||||
setDefaultRecordType();
|
||||
$('#addButton').unbind().click(addRecord);
|
||||
},
|
||||
"json"
|
||||
);
|
||||
}
|
||||
function setDefaultRecordType() {
|
||||
var reverseZone = false;
|
||||
if(domainName.endsWith('.in-addr.arpa')) reverseZone = true;
|
||||
if(domainName.endsWith('.ip6.arpa')) reverseZone = true;
|
||||
if(reverseZone) {
|
||||
$('#addType').val('PTR').change();
|
||||
}
|
||||
}
|
||||
function enableFilter(enable) {
|
||||
if(enable) {
|
||||
$('#searchName').prop("disabled", false);
|
||||
|
|
Loading…
Reference in a new issue