Add conditionals for showing reCaptcha keys in form
This commit is contained in:
parent
c0ee81ea7c
commit
2248a4b1ba
3 changed files with 10 additions and 6 deletions
|
@ -7,6 +7,7 @@
|
|||
### Bug Fixes
|
||||
|
||||
* Use correct text string for "Back to Top" link. [#1595](https://github.com/mmistakes/minimal-mistakes/issues/1595)
|
||||
* Add conditionals for showing `reCaptcha.siteKey` and `reCaptcha.secret` in Staticman comments form.
|
||||
|
||||
## [4.11.1](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.11.1)
|
||||
|
||||
|
|
|
@ -77,17 +77,19 @@
|
|||
<input type="hidden" name="options[slug]" value="{{ page.slug }}">
|
||||
<label for="comment-form-location">Not used. Leave blank if you are a human.</label>
|
||||
<input type="text" id="comment-form-location" name="fields[hidden]" autocomplete="off"/>
|
||||
<input type="hidden" name="options[reCaptcha][siteKey]" value="{{ site.reCaptcha.siteKey }}">
|
||||
<input type="hidden" name="options[reCaptcha][secret]" value="{{ site.reCaptcha.secret }}">
|
||||
{% if site.reCaptcha.siteKey %}<input type="hidden" name="options[reCaptcha][siteKey]" value="{{ site.reCaptcha.siteKey }}">{% endif %}
|
||||
{% if site.reCaptcha.secret %}<input type="hidden" name="options[reCaptcha][secret]" value="{{ site.reCaptcha.secret }}">{% endif %}
|
||||
</div>
|
||||
<!-- Start comment form alert messaging -->
|
||||
<p class="hidden js-notice">
|
||||
<strong class="js-notice-text"></strong>
|
||||
</p>
|
||||
<!-- End comment form alert messaging -->
|
||||
{% if site.reCaptcha.siteKey %}
|
||||
<div class="form-group">
|
||||
<div class="g-recaptcha" data-sitekey="{{ site.reCaptcha.siteKey }}"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="form-group">
|
||||
<button type="submit" id="comment-form-submit" tabindex="5" class="btn btn--primary btn--large">{{ site.data.ui-text[site.locale].comment_btn_submit | default: "Submit Comment" }}</button>
|
||||
</div>
|
||||
|
|
|
@ -4,7 +4,7 @@ permalink: /docs/history/
|
|||
excerpt: "Change log of enhancements and bug fixes made to the theme."
|
||||
sidebar:
|
||||
nav: docs
|
||||
last_modified_at: 2018-03-29T12:48:09-04:00
|
||||
last_modified_at: 2018-03-30T18:39:37-04:00
|
||||
toc: true
|
||||
---
|
||||
|
||||
|
@ -17,6 +17,7 @@ toc: true
|
|||
### Bug Fixes
|
||||
|
||||
* Use correct text string for "Back to Top" link. [#1595](https://github.com/mmistakes/minimal-mistakes/issues/1595)
|
||||
* Add conditionals for showing `reCaptcha.siteKey` and `reCaptcha.secret` in Staticman comments form.
|
||||
|
||||
## [4.11.1](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.11.1)
|
||||
|
||||
|
|
Loading…
Reference in a new issue