diff options
author | Michael Grosser <development@stp-ip.net> | 2017-08-22 15:05:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-22 15:05:22 +0300 |
commit | f665b3702dec1715cd2e1d86767a1e2308cf5d15 (patch) | |
tree | 0ae75cfdea1fc68e6a0984a2c796163e52090615 | |
parent | d286376cd0ba9daa0ab51b838f2f79cf5e09a109 (diff) | |
parent | c2b88e7ed80e583ba983430cf9d7946deec2e292 (diff) |
Merge pull request #23 from alarsyo/fix-form
Don't use recaptcha when postURL is not defined
-rw-r--r-- | layouts/partials/contact.html | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/layouts/partials/contact.html b/layouts/partials/contact.html index 5f888ad..3a7f724 100644 --- a/layouts/partials/contact.html +++ b/layouts/partials/contact.html @@ -30,8 +30,11 @@ {{ end }} </div> <ul class="actions"> - <li><button type="submit" {{ with .Site.Params.contact.captcha }} class="g-recaptcha" -data-sitekey="{{ .sitekey }}" data-callback="onSubmit" data-badge="inline" {{ end }}>{{ .Site.Params.contact.buttonText }}</button></li> + <li><button type="submit" + {{ if .Site.Params.contact.postURL }} + {{ with .Site.Params.contact.captcha }} class="g-recaptcha" +data-sitekey="{{ .sitekey }}" data-callback="onSubmit" data-badge="inline" {{ end }} + {{ end }}>{{ .Site.Params.contact.buttonText }}</button></li> </ul> {{ range .Site.Params.contact.fields.hidden }} {{ if eq .name "site" }} |