diff options
| author | spiderr <spiderr@bitweaver.org> | 2020-08-12 12:23:27 -0400 |
|---|---|---|
| committer | spiderr <spiderr@bitweaver.org> | 2020-08-12 12:23:27 -0400 |
| commit | 9505b7a4c2e117bf555a739d22d13a72d1ba072a (patch) | |
| tree | 491bd7336a9ae7bb8fc781a4807e134d4fd586d0 /templates/captcha.tpl | |
| parent | 0c20b1f6b3b5647c63609f3899fa106ab74d33c3 (diff) | |
| download | users-9505b7a4c2e117bf555a739d22d13a72d1ba072a.tar.gz users-9505b7a4c2e117bf555a739d22d13a72d1ba072a.tar.bz2 users-9505b7a4c2e117bf555a739d22d13a72d1ba072a.zip | |
move all captcha code to users/
Diffstat (limited to 'templates/captcha.tpl')
| -rw-r--r-- | templates/captcha.tpl | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/templates/captcha.tpl b/templates/captcha.tpl new file mode 100644 index 0000000..1219389 --- /dev/null +++ b/templates/captcha.tpl @@ -0,0 +1,65 @@ +{if $gBitSystem->isFeatureActive('users_random_number_reg')} + {literal} + <script type="text/javascript"> /* <![CDATA[ */ + function reloadImage() { + element = document.getElementById('captcha_img'); + if (element) { + thesrc = element.src; + thesrc = thesrc.substring(0,thesrc.lastIndexOf(".")+4); + document.getElementById("captcha_img").src = thesrc+"?"+Math.round(Math.random()*100000); + } + } + /* ]]> */ </script> + {/literal} + + + + {if $params.variant == "condensed"} + <span class="captcha" {if $params.id}id="{$params.id}"{/if} {if $params.style}style="{$params.style}"{/if}> + {formfeedback error=$errors.captcha} + <img id='captcha_img' onclick="this.blur();reloadImage();return false;" class="alignmiddle" id="captcha_img" src="{$params.source}" alt="{tr}Random Image{/tr}"/> + <br /> + <input type="text" name="captcha" id="captcha" size="{$params.size+3}"/> + <br /> + <small><em>{tr}Please copy the code into the box. Reload if unreadable.{/tr}</em></small> + </span> + <br /> + {else} + <div class="form-group {if $errors.captcha}error{/if}" {if $params.id}id="{$params.id}"{/if} {if $params.style}style="{$params.style}"{/if}> + {formlabel label="Verification Code" for="captcha"} + {forminput} + <img id='captcha_img' onclick="this.blur();reloadImage();return false;" src="{$params.source}" alt="{tr}Random Image{/tr}"/> + <br/> + <input type="text" name="captcha" id="captcha" size="{$params.size+3}" class="form-control"/> + {formhelp note="Please copy the code into the box. Reload the page or click the image if it is unreadable. Note that it is not case sensitive."} + {if empty($smarty.cookies)}<div class="error">You do not currently have any cookies from this site. You must accept cookies in order to pass the captcha. For information on enabling cookies in your browser see this: <a href="http://www.google.com/cookies.html">google page on cookies</a>.</div>{/if} + {formfeedback error=$errors.captcha} + {/forminput} + </div> + {/if} +{/if} + +{if $gBitSystem->isFeatureActive('users_register_recaptcha')} + <div class="form-group {if $errors.recaptcha}error{/if}"> + {formlabel label="Are you human?" for="recaptcha"} + {forminput} + {formfeedback error=$errors.recaptcha} + <script src="https://www.google.com/recaptcha/api.js" async defer></script> + <div class="g-recaptcha" data-sitekey="{$gBitSystem->getConfig('users_register_recaptcha_site_key')}"></div> + {formhelp note="Sorry, we have to ask."} + {/forminput} + </div> +{/if} + +{if $gBitSystem->isFeatureActive('users_register_smcaptcha')} + <div class="form-group {if $errors.smcaptcha}error{/if}"> + {formlabel label="Are you human?" for="smcaptcha"} + {forminput} + {formfeedback error=$errors.smcaptcha} + {$solveMediaHtml} + {formhelp note="Sorry, we have to ask."} + {/forminput} + </div> +{/if} + + |
