Merge branch 'master' into easy-forms

This commit is contained in:
2019-03-31 21:12:21 +02:00
13 changed files with 214 additions and 70 deletions

View File

@@ -16,23 +16,7 @@ func (wc *WebController) serveRegister(
p httprouter.Params,
) {
var tpld = wc.newTemplateData(w, r)
// This only runs on the first request
if wc.captchaSiteKey == "" {
capt, err := tpld.PixelAPI.GetRecaptcha()
if err != nil {
log.Error("Error getting recaptcha key: %s", err)
w.WriteHeader(http.StatusInternalServerError)
return
}
if capt.SiteKey == "" {
wc.captchaSiteKey = "none"
} else {
wc.captchaSiteKey = capt.SiteKey
}
}
tpld.Other = wc.captchaSiteKey
tpld.Other = wc.captchaKey()
err := wc.templates.Get().ExecuteTemplate(w, "register", tpld)
if err != nil {