diff options
author | Fluf <36822577+flufmonster@users.noreply.github.com> | 2018-07-05 00:13:05 -0400 |
---|---|---|
committer | techknowlogick <techknowlogick@users.noreply.github.com> | 2018-07-05 00:13:05 -0400 |
commit | f035dcd4f221a631cc499d90661237d6cf601843 (patch) | |
tree | 18f7cfd148dd36c85e4c82c8cd5fdef88c249606 /templates/user | |
parent | 54fedd4070be9819a6dd4e441b3c5689334eae9d (diff) | |
download | gitea-f035dcd4f221a631cc499d90661237d6cf601843.tar.gz gitea-f035dcd4f221a631cc499d90661237d6cf601843.zip |
Add Recaptcha functionality to Gitea (#4044)
Diffstat (limited to 'templates/user')
-rw-r--r-- | templates/user/auth/signup_inner.tmpl | 7 | ||||
-rw-r--r-- | templates/user/auth/signup_openid_register.tmpl | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/templates/user/auth/signup_inner.tmpl b/templates/user/auth/signup_inner.tmpl index 52386f6dcf..cd969276b9 100644 --- a/templates/user/auth/signup_inner.tmpl +++ b/templates/user/auth/signup_inner.tmpl @@ -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> diff --git a/templates/user/auth/signup_openid_register.tmpl b/templates/user/auth/signup_openid_register.tmpl index 741ffdf3b5..67f03a19ed 100644 --- a/templates/user/auth/signup_openid_register.tmpl +++ b/templates/user/auth/signup_openid_register.tmpl @@ -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> |