diff --git a/app/models.py b/app/models.py
index f60f10c..25b58b0 100644
--- a/app/models.py
+++ b/app/models.py
@@ -2013,8 +2013,8 @@ class Setting(db.Model):
'oidc_oauth_api_url': '',
'oidc_oauth_token_url': '',
'oidc_oauth_authorize_url': '',
- 'forward_records_allow_edit': {'A': True, 'AAAA': True, 'AFSDB': False, 'ALIAS': False, 'CAA': True, 'CERT': False, 'CDNSKEY': False, 'CDS': False, 'CNAME': True, 'DNSKEY': False, 'DNAME': False, 'DS': False, 'HINFO': False, 'KEY': False, 'LOC': True, 'MX': True, 'NAPTR': False, 'NS': True, 'NSEC': False, 'NSEC3': False, 'NSEC3PARAM': False, 'OPENPGPKEY': False, 'PTR': True, 'RP': False, 'RRSIG': False, 'SOA': False, 'SPF': True, 'SSHFP': False, 'SRV': True, 'TKEY': False, 'TSIG': False, 'TLSA': False, 'SMIMEA': False, 'TXT': True, 'URI': False},
- 'reverse_records_allow_edit': {'A': False, 'AAAA': False, 'AFSDB': False, 'ALIAS': False, 'CAA': False, 'CERT': False, 'CDNSKEY': False, 'CDS': False, 'CNAME': False, 'DNSKEY': False, 'DNAME': False, 'DS': False, 'HINFO': False, 'KEY': False, 'LOC': True, 'MX': False, 'NAPTR': False, 'NS': True, 'NSEC': False, 'NSEC3': False, 'NSEC3PARAM': False, 'OPENPGPKEY': False, 'PTR': True, 'RP': False, 'RRSIG': False, 'SOA': False, 'SPF': False, 'SSHFP': False, 'SRV': False, 'TKEY': False, 'TSIG': False, 'TLSA': False, 'SMIMEA': False, 'TXT': True, 'URI': False},
+ 'forward_records_allow_edit': {'A': True, 'AAAA': True, 'AFSDB': False, 'ALIAS': False, 'CAA': True, 'CERT': False, 'CDNSKEY': False, 'CDS': False, 'CNAME': True, 'DNSKEY': False, 'DNAME': False, 'DS': False, 'HINFO': False, 'KEY': False, 'LOC': True, 'LUA': False, 'MX': True, 'NAPTR': False, 'NS': True, 'NSEC': False, 'NSEC3': False, 'NSEC3PARAM': False, 'OPENPGPKEY': False, 'PTR': True, 'RP': False, 'RRSIG': False, 'SOA': False, 'SPF': True, 'SSHFP': False, 'SRV': True, 'TKEY': False, 'TSIG': False, 'TLSA': False, 'SMIMEA': False, 'TXT': True, 'URI': False},
+ 'reverse_records_allow_edit': {'A': False, 'AAAA': False, 'AFSDB': False, 'ALIAS': False, 'CAA': False, 'CERT': False, 'CDNSKEY': False, 'CDS': False, 'CNAME': False, 'DNSKEY': False, 'DNAME': False, 'DS': False, 'HINFO': False, 'KEY': False, 'LOC': True, 'LUA': False, 'MX': False, 'NAPTR': False, 'NS': True, 'NSEC': False, 'NSEC3': False, 'NSEC3PARAM': False, 'OPENPGPKEY': False, 'PTR': True, 'RP': False, 'RRSIG': False, 'SOA': False, 'SPF': False, 'SSHFP': False, 'SRV': False, 'TKEY': False, 'TSIG': False, 'TLSA': False, 'SMIMEA': False, 'TXT': True, 'URI': False},
'ttl_options': '1 minute,5 minutes,30 minutes,60 minutes,24 hours',
}
diff --git a/app/templates/domain.html b/app/templates/domain.html
index d7e4ebc..029d84d 100644
--- a/app/templates/domain.html
+++ b/app/templates/domain.html
@@ -369,94 +369,94 @@
modal.modal('hide');
})
modal.modal('show');
- } else if (record_type == "SOA") {
- var modal = $("#modal_custom_record");
- if (record_data.val() == "") {
- var form = " \
- \
- \
- \
- \
- \
- \
- \
- \
- \
- \
- \
- \
- \
- ";
- } else {
- var parts = record_data.val().split(" ");
- var form = " \
- \
- \
- \
- \
- \
- \
- \
- \
- \
- \
- \
- \
- \
- ";
- }
- modal.find('.modal-body p').html(form);
- modal.find('#button_save').click(function() {
- soa_primaryns = modal.find('#soa_primaryns').val();
- soa_adminemail = modal.find('#soa_adminemail').val();
- soa_serial = modal.find('#soa_serial').val();
- soa_zonerefresh = modal.find('#soa_zonerefresh').val();
- soa_failedzonerefresh = modal.find('#soa_failedzonerefresh').val();
- soa_zoneexpiry = modal.find('#soa_zoneexpiry').val();
- soa_minimumttl = modal.find('#soa_minimumttl').val();
+ } else if (record_type == "SOA") {
+ var modal = $("#modal_custom_record");
+ if (record_data.val() == "") {
+ var form = " \
+ \
+ \
+ \
+ \
+ \
+ \
+ \
+ \
+ \
+ \
+ \
+ \
+ \
+ ";
+ } else {
+ var parts = record_data.val().split(" ");
+ var form = " \
+ \
+ \
+ \
+ \
+ \
+ \
+ \
+ \
+ \
+ \
+ \
+ \
+ \
+ ";
+ }
+ modal.find('.modal-body p').html(form);
+ modal.find('#button_save').click(function() {
+ soa_primaryns = modal.find('#soa_primaryns').val();
+ soa_adminemail = modal.find('#soa_adminemail').val();
+ soa_serial = modal.find('#soa_serial').val();
+ soa_zonerefresh = modal.find('#soa_zonerefresh').val();
+ soa_failedzonerefresh = modal.find('#soa_failedzonerefresh').val();
+ soa_zoneexpiry = modal.find('#soa_zoneexpiry').val();
+ soa_minimumttl = modal.find('#soa_minimumttl').val();
- data = soa_primaryns + " " + soa_adminemail + " " + soa_serial + " " + soa_zonerefresh + " " + soa_failedzonerefresh + " " + soa_zoneexpiry + " " + soa_minimumttl;
- record_data.val(data);
- modal.modal('hide');
- })
+ data = soa_primaryns + " " + soa_adminemail + " " + soa_serial + " " + soa_zonerefresh + " " + soa_failedzonerefresh + " " + soa_zoneexpiry + " " + soa_minimumttl;
+ record_data.val(data);
+ modal.modal('hide');
+ })
modal.modal('show');
- } else if (record_type == "TLSA") {
- var modal = $("#modal_custom_record");
- if (record_data.val() == "") {
- var form = " \
- \
- \
- \
- \
- \
- \
- \
- ";
- } else {
- var parts = record_data.val().split(" ");
- var form = " \
- \
- \
- \
- \
- \
- \
- \
- ";
- }
- modal.find('.modal-body p').html(form);
- modal.find('#button_save').click(function() {
- tlsa_certificate_usage = modal.find('#tlsa_certificate_usage').val();
- tlsa_selector = modal.find('#tlsa_selector').val();
- tlsa_matching = modal.find('#tlsa_matching').val();
- tlsa_hash = modal.find('#tlsa_hash').val();
-
- data = tlsa_certificate_usage + " " + tlsa_selector + " " + tlsa_matching + " " + tlsa_hash;
- record_data.val(data);
- modal.modal('hide');
- })
+ } else if (record_type == "TLSA") {
+ var modal = $("#modal_custom_record");
+ if (record_data.val() == "") {
+ var form = " \
+ \
+ \
+ \
+ \
+ \
+ \
+ \
+ ";
+ } else {
+ var parts = record_data.val().split(" ");
+ var form = " \
+ \
+ \
+ \
+ \
+ \
+ \
+ \
+ ";
+ }
+ modal.find('.modal-body p').html(form);
+ modal.find('#button_save').click(function() {
+ tlsa_certificate_usage = modal.find('#tlsa_certificate_usage').val();
+ tlsa_selector = modal.find('#tlsa_selector').val();
+ tlsa_matching = modal.find('#tlsa_matching').val();
+ tlsa_hash = modal.find('#tlsa_hash').val();
+
+ data = tlsa_certificate_usage + " " + tlsa_selector + " " + tlsa_matching + " " + tlsa_hash;
+ record_data.val(data);
+ modal.modal('hide');
+ })
modal.modal('show');
- } else if (record_type == "TXT") {
+ } else if (record_type == "TXT") {
var txt_data = record_data.val().replace(/"/g, '"');
var modal = $("#modal_custom_record");
var form = " \
@@ -470,7 +470,28 @@
}
record_data.val(data);
modal.modal('hide');
- })
+ });
+ modal.modal('show');
+ } else if (record_type == "LUA") {
+ var lua_type = record_data.val().split(" ")[0];
+ var lua_data = record_data.val().substr(record_data.val().indexOf(" ") + 1).replace(/"/g, '"');
+ var modal = $("#modal_custom_record");
+ var form = " \
+ \
+ \
+ \
+ ";
+ modal.find('.modal-body p').html(form);
+ modal.find('#button_save').click(function() {
+ type = modal.find('#lua_type').val();
+ data = modal.find('#lua_record').val();
+ if (! /^".*"$/.test(data)) {
+ data = '"' + data + '"';
+ }
+ data = type + ' ' + data;
+ record_data.val(data);
+ modal.modal('hide');
+ });
modal.modal('show');
}
});