NuGet / PoliteCaptcha

PoliteCaptcha is a spam prevention library for use with ASP.NET MVC that attempts polite spam prevention first, before rudely presenting the user with a CAPTCHA.
Apache License 2.0
74 stars 13 forks source link

No styling for reCaptcha #8

Open wrohrbach opened 11 years ago

wrohrbach commented 11 years ago

Just installed v0.4.0.1 and everything seems to work except the theming for reCaptcha. Here is the code that PoliteCaptcha is generating for me:

<div class="PoliteCaptcha editor-field">
    <span class="field-validation-error" data-valmsg-for="PoliteCaptcha"><span htmlfor="PoliteCaptcha">Your request failed spam prevention. You must complete the CAPTCHA form below to proceed.</span></span>
    <script type="text/javascript">
        var RecaptchaOptions = {
            theme : '',
            tabindex : 0
        };
    </script>

    <script type="text/javascript" src="http://www.google.com/recaptcha/api/challenge?k=6LehOM0SAAAAAPgsjOy-6_grqy1JiB_W_jJa_aCw"></script>

    <noscript>
        <iframe src="http://www.google.com/recaptcha/api/noscript?k=6LehOM0SAAAAAPgsjOy-6_grqy1JiB_W_jJa_aCw" width="500" height="300" frameborder="0">
        </iframe><br /><textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea><input name="recaptcha_response_field" value="manual_challenge" type="hidden" />
    </noscript>
</div>

I'm pretty sure the issue has to do with this bit of code:

    <script type="text/javascript">
        var RecaptchaOptions = {
            theme : '',
            tabindex : 0
        };
    </script>

If Javascript is turned off, how is the theme supposed to be set using this script block? Am I missing something here?

TimLovellSmith commented 11 years ago

I don't think you're missing anything conceptually, rather PoliteCaptcha is missing the work done to make it play nicely with styling. Any further contributions (PR?) here that you can make would be greatly appreciated, as we aren't spending a lot of time on PoliteCaptcha but we are still actively monitoring for contributions, and very happy to help get those new versions with community contributed bugfixes out there.