diff --git a/edit-master.php b/edit-master.php index deab40a..93778a8 100644 --- a/edit-master.php +++ b/edit-master.php @@ -158,8 +158,8 @@ limitations under the License. - - + + diff --git a/js/edit-master.js b/js/edit-master.js index 61f77d7..318a689 100644 --- a/js/edit-master.js +++ b/js/edit-master.js @@ -331,11 +331,17 @@ function addRecord() { return; } + var prio = $('#addPrio').val(); + if(prio.length === 0) prio = 0; + + var ttl = $('#addTtl').val(); + if(ttl.length === 0) ttl = 86400; + var data = { type: $('#addType').val(), content: $('#addContent').val(), - prio: $('#addPrio').val(), - ttl: $('#addTtl').val(), + prio: prio, + ttl: ttl, action: "addRecord", domain: location.hash.substring(1), csrfToken: $('#csrfToken').text()