Skip to content

Commit c04e9bf

Browse files
committed
ensure recaptcha stays on new line when form field errors present
1 parent 6171174 commit c04e9bf

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

Resources/views/Form/fields.html.twig

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -224,17 +224,19 @@
224224
{% block ewz_recaptcha_widget %}
225225
{% spaceless %}
226226
{% if form.vars.ewz_recaptcha_enabled %}
227-
{% if attr.options is defined %}
228-
<script type="text/javascript">
229-
var RecaptchaOptions = {{ attr.options|json_encode|raw }}
230-
</script>
231-
{% endif %}
232-
<script src="{{ form.vars.url_challenge }}" type="text/javascript"></script>
233-
<noscript>
234-
<iframe src="{{ form.vars.url_noscript }}" height="300" width="500"></iframe><br/>
235-
<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
236-
<input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
237-
</noscript>
227+
<div class="clearfix" style="display:block;clear:both;">
228+
{% if attr.options is defined %}
229+
<script type="text/javascript">
230+
var RecaptchaOptions = {{ attr.options|json_encode|raw }}
231+
</script>
232+
{% endif %}
233+
<script src="{{ form.vars.url_challenge }}" type="text/javascript"></script>
234+
<noscript>
235+
<iframe src="{{ form.vars.url_noscript }}" height="300" width="500"></iframe><br/>
236+
<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
237+
<input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
238+
</noscript>
239+
</div>
238240
{% endif %}
239241
{% endspaceless %}
240242
{% endblock ewz_recaptcha_widget %}

0 commit comments

Comments
 (0)