From 85694e4e931ebee9a626c9709d7be8b307d79e73 Mon Sep 17 00:00:00 2001 From: Christopher Himmel Date: Wed, 10 May 2017 22:30:06 +0200 Subject: [PATCH 1/4] added caa record helper --- app/templates/domain.html | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/app/templates/domain.html b/app/templates/domain.html index eeb4c27..36d6ae9 100644 --- a/app/templates/domain.html +++ b/app/templates/domain.html @@ -265,7 +265,36 @@ $(document.body).on("focus", "#current_edit_record_data", function (e) { var record_type = $(this).parents("tr").find('#record_type').val(); var record_data = $(this); - if (record_type == "MX") { + if (record_type == "CAA") { + 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() { + caa_flag = modal.find('#caa_flag').val(); + caa_tag = modal.find('#caa_tag').val(); + caa_value = modal.find('#caa_value').val(); + data = caa_flag + " " + caa_tag + " " + caa_value; + record_data.val(data); + modal.modal('hide'); + }) + } else if (record_type == "MX") { var modal = $("#modal_custom_record"); if (record_data.val() == "") { var form = " \ From 300af228592c9ae38530a1b4cde3486592141059 Mon Sep 17 00:00:00 2001 From: toxicvengeance Date: Wed, 10 May 2017 22:33:44 +0200 Subject: [PATCH 2/4] added caa record helper --- app/templates/domain.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/templates/domain.html b/app/templates/domain.html index 36d6ae9..af560a7 100644 --- a/app/templates/domain.html +++ b/app/templates/domain.html @@ -290,10 +290,11 @@ caa_flag = modal.find('#caa_flag').val(); caa_tag = modal.find('#caa_tag').val(); caa_value = modal.find('#caa_value').val(); - data = caa_flag + " " + caa_tag + " " + caa_value; + data = caa_flag + " " + caa_tag + " " + '"' + caa_value + '"'; record_data.val(data); modal.modal('hide'); }) + modal.modal('show'); } else if (record_type == "MX") { var modal = $("#modal_custom_record"); if (record_data.val() == "") { From c9bfe00e59975fb7d85f7898cc936044e028b545 Mon Sep 17 00:00:00 2001 From: toxicvengeance Date: Wed, 10 May 2017 23:15:01 +0200 Subject: [PATCH 3/4] added example caa values --- app/templates/domain.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/templates/domain.html b/app/templates/domain.html index af560a7..ded785b 100644 --- a/app/templates/domain.html +++ b/app/templates/domain.html @@ -280,9 +280,9 @@ var form = " \ \ \ - \ + \ \ - \ + \ "; } modal.find('.modal-body p').html(form); From 5c5beec2d6993c7174e723e758453b6245498334 Mon Sep 17 00:00:00 2001 From: toxicvengeance Date: Wed, 10 May 2017 23:25:32 +0200 Subject: [PATCH 4/4] added default values --- app/templates/domain.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/templates/domain.html b/app/templates/domain.html index ded785b..af6b30e 100644 --- a/app/templates/domain.html +++ b/app/templates/domain.html @@ -271,9 +271,9 @@ var form = " \ \ \ - \ + \ \ - \ + \ "; } else { var parts = record_data.val().split(" ");