You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

captcha.tmpl 1.3KB

12345678910111213141516171819202122232425262728
  1. {{if .EnableCaptcha}}{{if eq .CaptchaType "image"}}
  2. <div class="inline field">
  3. <label>{{/* This is CAPTCHA field */}}</label>
  4. {{.Captcha.CreateHTML}}
  5. </div>
  6. <div class="required inline field {{if .Err_Captcha}}error{{end}}">
  7. <label for="captcha">{{ctx.Locale.Tr "captcha"}}</label>
  8. <input id="captcha" name="captcha" value="{{.captcha}}" autocomplete="off">
  9. </div>
  10. {{else if eq .CaptchaType "recaptcha"}}
  11. <div class="inline field required">
  12. <div id="captcha" data-captcha-type="g-recaptcha" class="g-recaptcha-style" data-sitekey="{{.RecaptchaSitekey}}"></div>
  13. </div>
  14. {{else if eq .CaptchaType "hcaptcha"}}
  15. <div class="inline field required">
  16. <div id="captcha" data-captcha-type="h-captcha" class="h-captcha-style" data-sitekey="{{.HcaptchaSitekey}}"></div>
  17. </div>
  18. {{else if eq .CaptchaType "mcaptcha"}}
  19. <div class="inline field">
  20. <label></label>
  21. <div class="m-captcha-style" id="mcaptcha__widget-container"></div>
  22. <div id="captcha" data-captcha-type="m-captcha" data-sitekey="{{.McaptchaSitekey}}" data-instance-url="{{.McaptchaURL}}"></div>
  23. </div>
  24. {{else if eq .CaptchaType "cfturnstile"}}
  25. <div class="inline field gt-text-center">
  26. <div id="captcha" data-captcha-type="cf-turnstile" data-sitekey="{{.CfTurnstileSitekey}}"></div>
  27. </div>
  28. {{end}}{{end}}