form: modularize captcha somewhat

This commit is contained in:
Harvey Tindall
2023-12-23 18:20:09 +00:00
parent 6e205760c3
commit ab05c07469
4 changed files with 80 additions and 49 deletions
+3
View File
@@ -296,6 +296,9 @@ func (app *appContext) ResetPassword(gc *gin.Context) {
data["telegramEnabled"] = false
data["discordEnabled"] = false
data["matrixEnabled"] = false
data["captcha"] = app.config.Section("captcha").Key("enabled").MustBool(false)
data["reCAPTCHA"] = app.config.Section("captcha").Key("recaptcha").MustBool(false)
data["reCAPTCHASiteKey"] = app.config.Section("captcha").Key("recaptcha_site_key").MustString("")
gcHTML(gc, http.StatusOK, "form-loader.html", data)
return
}