-35 Removals
+29 Additions

Created by:phpboost

1# IF C_RECAPTCHA_V2 #
2<script>
3<!--
4jQuery(document).ready(function() {
5 if(window.innerWidth >= 360) {
6 jQuery('\#recaptcha-widget-container').html('<div id="{HTML_ID}" class="g-recaptcha" data-sitekey="{SITE_KEY}"></div><script src="https://www.google.com/recaptcha/api.js" async></ script>');
7 }
8});
9-->
10</script>
11# ENDIF #
12<div id="recaptcha-widget-container"> 1<div id="recaptcha-widget-container">
13 <div id="recaptcha-widget" style="display: none;"> 2 <div id="{HTML_ID}" class="g-recaptcha" data-sitekey="{SITE_KEY}"# IF C_INVISIBLE # data-callback="captchaSubmitCallback" data-size="invisible"# ENDIF #></div>
14 <div id="recaptcha_response_field" style="display: none;"></div> 3 # IF C_INVISIBLE #
15 <div id="recaptcha-container"> 4 <script>
16 <div id="recaptcha_image"></div> 5 jQuery(document).ready(function(){
17 <div class="recaptcha_only_if_incorrect_sol color-alert">{@incorrect_sol}</div> 6 jQuery("\#{HTML_ID}_field").css('height', 0);
18 <input type="text" id="{HTML_ID}" name="{HTML_ID}" placeholder="{@type_the_answer_here}"/> 7 jQuery("\#{HTML_ID}_field").parent().css('height', 0);
19 </div> 8 });
20 <div class="options"> 9
21 <a href="javascript:Recaptcha.reload()" title="{@refresh_captcha}" class="fa fa-refresh"></a> 10 var captchaOnloadCallback = function() {
22 <div class="recaptcha_only_if_image"><a href="javascript:Recaptcha.switch_type('audio')" title="{@audio_captcha}" class="fa fa-volume-up"></a></div> 11 grecaptcha.render('{HTML_ID}', {
23 <div class="recaptcha_only_if_audio"><a href="javascript:Recaptcha.switch_type('image')" title="{@image_captcha}" class="fa fa-picture-o"></a></div> 12 'sitekey' : '{SITE_KEY}',
24 <div><a href="javascript:Recaptcha.showhelp()" title="{@captcha_help}" class="fa fa-question-circle"></a></div> 13 'callback' : 'captchaSubmitCallback',
25 </div> 14 'size' : 'invisible'
26 </div> 15 });
27 16 };
28 <script > 17
29 var RecaptchaOptions = { 18 jQuery("button[name='{FORM_ID}_submit']").on('click', function (e) {
30 theme : 'custom', 19 e.preventDefault();
31 lang : '{LANG}', 20 grecaptcha.execute();
32 custom_theme_widget: 'recaptcha-widget' 21 });
33 }; 22
34 </script > 23 var captchaSubmitCallback = function(token) {
35 <script src="https://www.google.com/recaptcha/api/challenge?k={SITE_KEY}" ></script > 24 jQuery("\#{FORM_ID}").append("<input type='hidden' name='{FORM_ID}_submit' value='true' />");
36</div> 25 jQuery("\#{FORM_ID}").submit();
26 };
27 </script>
28 # ENDIF #
29 <script src="//www.google.com/recaptcha/api.js# IF C_INVISIBLE #?onload=captchaOnloadCallback&render=explicit# ENDIF #" async defer></script>
30</div>
Editor
Original Text
Changed Text
Recommended videos