From 82cfe3e29827a08fefbd49d1416b7649c304fb50 Mon Sep 17 00:00:00 2001 From: xenoid Date: Wed, 5 Sep 2018 10:02:17 +0200 Subject: [PATCH] Changes to GUI for certificate-authorized requests Added GUI elements for enabling certificate-authorized requests. --- restman/index.html | 28 ++++++++++++++++++++++++++++ restman/js/ui/modals.js | 13 +++++++++++++ 2 files changed, 41 insertions(+) diff --git a/restman/index.html b/restman/index.html index 2845f0b..3842b45 100644 --- a/restman/index.html +++ b/restman/index.html @@ -103,6 +103,20 @@

Headers

+
+ +
+ + +
diff --git a/restman/js/ui/modals.js b/restman/js/ui/modals.js index 79c8c2e..78de464 100644 --- a/restman/js/ui/modals.js +++ b/restman/js/ui/modals.js @@ -17,6 +17,19 @@ $(document).ready(function(event) { $('#BasicAuthForm').foundation('reveal', 'close') }); + + /* Save Certificate header */ + $('#CertificateForm .save-modal').click(function (event) { + var certinput = document.getElementById('cert'); + var keyinput = document.getElementById('key'); + var item = restman.ui.dynamic_list.add_item('#CertificateTable'); + var cert = certinput.value.split(/(\\|\/)/g).pop(); + var key = keyinput.value.split(/(\\|\/)/g).pop(); + item.find('input.key').val(cert); + item.find('input.value').val(key); + + $('#CertificateForm').foundation('reveal', 'close') + }); /* Save Options */ $('#OptionsForm .save-modal').click(function (event) {