mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Add Recaptcha functionality to Gitea (#4044)
This commit is contained in:
@@ -67,6 +67,11 @@
|
||||
{{if .RequireU2F}}
|
||||
<script src="{{AppSubUrl}}/vendor/plugins/u2f/index.js"></script>
|
||||
{{end}}
|
||||
{{if .EnableCaptcha}}
|
||||
{{if eq .CaptchaType "recaptcha"}}
|
||||
<script src="https://www.google.com/recaptcha/api.js" async></script>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{if .RequireTribute}}
|
||||
<script src="{{AppSubUrl}}/vendor/plugins/tribute/tribute.min.js"></script>
|
||||
|
||||
|
@@ -29,7 +29,7 @@
|
||||
<label for="retype">{{.i18n.Tr "re_type"}}</label>
|
||||
<input id="retype" name="retype" type="password" value="{{.retype}}" autocomplete="off" required>
|
||||
</div>
|
||||
{{if .EnableCaptcha}}
|
||||
{{if and .EnableCaptcha (eq .CaptchaType "image")}}
|
||||
<div class="inline field">
|
||||
<label></label>
|
||||
{{.Captcha.CreateHtml}}
|
||||
@@ -39,6 +39,11 @@
|
||||
<input id="captcha" name="captcha" value="{{.captcha}}" autocomplete="off">
|
||||
</div>
|
||||
{{end}}
|
||||
{{if and .EnableCaptcha (eq .CaptchaType "recaptcha")}}
|
||||
<div class="inline field required">
|
||||
<div class="g-recaptcha" data-sitekey="{{ .RecaptchaSitekey }}"></div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<div class="inline field">
|
||||
<label></label>
|
||||
|
@@ -20,7 +20,7 @@
|
||||
<label for="email">{{.i18n.Tr "email"}}</label>
|
||||
<input id="email" name="email" type="email" value="{{.email}}" required>
|
||||
</div>
|
||||
{{if .EnableCaptcha}}
|
||||
{{if and .EnableCaptcha (eq .CaptchaType "image")}}
|
||||
<div class="inline field">
|
||||
<label></label>
|
||||
{{.Captcha.CreateHtml}}
|
||||
@@ -30,6 +30,11 @@
|
||||
<input id="captcha" name="captcha" value="{{.captcha}}" autocomplete="off">
|
||||
</div>
|
||||
{{end}}
|
||||
{{if and .EnableCaptcha (eq .CaptchaType "recaptcha")}}
|
||||
<div class="inline field required">
|
||||
<div class="g-recaptcha" data-sitekey="{{ .RecaptchaSitekey }}"></div>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="inline field">
|
||||
<label for="openid">OpenID URI</label>
|
||||
<input id="openid" value="{{ .OpenID }}" readonly>
|
||||
|
Reference in New Issue
Block a user