summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorGusted <williamzijl7@hotmail.com>2022-08-10 13:20:10 +0000
committerGitHub <noreply@github.com>2022-08-10 15:20:10 +0200
commit58de07e5fd14c23dd4c4a315b8c5b3fb3219f66a (patch)
treecec2e02c494e19a42bc6095c480d93354259b669 /templates
parent452272c0384d7033ffde18bcb1167e8e49ff598c (diff)
downloadgitea-58de07e5fd14c23dd4c4a315b8c5b3fb3219f66a.tar.gz
gitea-58de07e5fd14c23dd4c4a315b8c5b3fb3219f66a.zip
Add support mCaptcha as captcha provider (#20458)
https://mcaptcha.org/ Co-authored-by: Felipe Leopoldo Sologuren GutiƩrrez <fsologureng@users.noreply.github.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/user/auth/signup_inner.tmpl8
-rw-r--r--templates/user/auth/signup_openid_register.tmpl5
2 files changed, 13 insertions, 0 deletions
diff --git a/templates/user/auth/signup_inner.tmpl b/templates/user/auth/signup_inner.tmpl
index 356c3e1cdc..58380f57d8 100644
--- a/templates/user/auth/signup_inner.tmpl
+++ b/templates/user/auth/signup_inner.tmpl
@@ -54,6 +54,14 @@
<div class="h-captcha" data-sitekey="{{ .HcaptchaSitekey }}"></div>
</div>
{{end}}
+ {{if and .EnableCaptcha (eq .CaptchaType "mcaptcha")}}
+ <div class="inline field df ac db-small">
+ <span>{{.locale.Tr "captcha"}}</span>
+ <div class="border-secondary w-100-small" id="mcaptcha__widget-container" style="width: 50%; height: 5em"></div>
+ <div class="m-captcha" data-sitekey="{{ .McaptchaSitekey }}" data-instance-url="{{ .McaptchaURL }}"></div>
+ </div>
+ {{end}}
+
<div class="inline field">
<label></label>
diff --git a/templates/user/auth/signup_openid_register.tmpl b/templates/user/auth/signup_openid_register.tmpl
index 5edd7966ff..9fe0a9de1b 100644
--- a/templates/user/auth/signup_openid_register.tmpl
+++ b/templates/user/auth/signup_openid_register.tmpl
@@ -40,6 +40,11 @@
<div class="h-captcha" data-sitekey="{{ .HcaptchaSitekey }}"></div>
</div>
{{end}}
+ {{if and .EnableCaptcha (eq .CaptchaType "mcaptcha")}}
+ <div class="inline field required">
+ <div class="m-captcha" data-sitekey="{{ .McaptchaSitekey }}" data-instance-url="{{ .McaptchaURL }}"></div>
+ </div>
+ {{end}}
<div class="inline field">
<label for="openid">OpenID URI</label>
<input id="openid" value="{{ .OpenID }}" readonly>