fix naming convention

This commit is contained in:
dalun 2023-08-28 03:35:20 +00:00
parent 6a0c7cf499
commit eb98624a6a
2 changed files with 8 additions and 8 deletions

View File

@ -308,7 +308,7 @@ func (a *ACMEHandler) HandleRenewCertificate(w http.ResponseWriter, r *http.Requ
} }
if ca == "custom" { if ca == "custom" {
caUrl, err = utils.PostPara(r, "ca_url") caUrl, err = utils.PostPara(r, "caURL")
if err != nil { if err != nil {
log.Println("Custom CA set but no URL provide, Using default") log.Println("Custom CA set but no URL provide, Using default")
ca, caUrl = "", "" ca, caUrl = "", ""

View File

@ -114,9 +114,9 @@
</div> </div>
</div> </div>
</div> </div>
<div class="field" id="customca" style="display:none;"> <div class="field" id="caInput" style="display:none;">
<label>ACME Server URL</label> <label>ACME Server URL</label>
<input id="caurl" type="text" placeholder="https://example.com/acme/dictionary"> <input id="caURL" type="text" placeholder="https://example.com/acme/dictionary">
</div> </div>
<div class="field" id="skipTLS" style="display:none;"> <div class="field" id="skipTLS" style="display:none;">
<div class="ui checkbox"> <div class="ui checkbox">
@ -308,10 +308,10 @@
$("input[name=ca]").on('change', function() { $("input[name=ca]").on('change', function() {
if(this.value == "Custom ACME Server") { if(this.value == "Custom ACME Server") {
$("#customca").show(); $("#caInput").show();
$("#skipTLS").show(); $("#skipTLS").show();
} else { } else {
$("#customca").hide(); $("#caInput").hide();
$("#skipTLS").hide(); $("#skipTLS").hide();
} }
}) })
@ -339,10 +339,10 @@
} }
var ca = $("#ca").dropdown("get value"); var ca = $("#ca").dropdown("get value");
var ca_url = ""; var caURL = "";
if (ca == "Custom ACME Server") { if (ca == "Custom ACME Server") {
ca = "custom"; ca = "custom";
ca_url = $("#caurl").val(); caURL = $("#caURL").val();
} }
var skipTLSValue = $("#skipTLSCheckbox")[0].checked; var skipTLSValue = $("#skipTLSCheckbox")[0].checked;
@ -355,7 +355,7 @@
filename: filename, filename: filename,
email: email, email: email,
ca: ca, ca: ca,
ca_url: ca_url, caURL: caURL,
skipTLS: skipTLSValue, skipTLS: skipTLSValue,
}, },
success: function(response) { success: function(response) {