diff --git a/src/web/snippet/acme.html b/src/web/snippet/acme.html index eff049e..24e1d8c 100644 --- a/src/web/snippet/acme.html +++ b/src/web/snippet/acme.html @@ -109,10 +109,15 @@
Let's Encrypt
Buypass
ZeroSSL
+
Custom ACME Server
+
@@ -295,6 +300,14 @@ obtainCertificate(); }); + $("input[name=ca]").on('change', function() { + if(this.value == "Custom ACME Server") { + $("#customca").show(); + } else { + $("#customca").hide(); + } + }) + // Obtain certificate from API function obtainCertificate() { var domains = $("#domainsInput").val(); @@ -316,7 +329,14 @@ parent.msgbox("Filename cannot be empty for certs containing multiple domains.") return; } + var ca = $("#ca").dropdown("get value"); + var ca_url = ""; + if (ca == "Custom ACME Server") { + ca = "custom"; + ca_url = $("#caurl").val(); + } + $.ajax({ url: "/api/acme/obtainCert", method: "GET", @@ -325,6 +345,7 @@ filename: filename, email: email, ca: ca, + ca_url: ca_url, }, success: function(response) { $("#obtainButton").removeClass("loading").removeClass("disabled");