From 0cf88b50baf89fc838bc414c8fc91aeb98ba5fa3 Mon Sep 17 00:00:00 2001 From: Ivan Filippov Date: Tue, 7 Jun 2016 22:33:03 -0600 Subject: [PATCH] Add SOA record helper. --- app/templates/domain.html | 50 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/app/templates/domain.html b/app/templates/domain.html index 27c5472..c958edc 100644 --- a/app/templates/domain.html +++ b/app/templates/domain.html @@ -311,6 +311,56 @@ record_data.val(data); modal.modal('hide'); }) + } 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'); + }) modal.modal('show'); } });