Changeset 4283

Show
Ignore:
Timestamp:
09/16/08 13:14:55 (4 months ago)
Author:
alecu
Message:

the recaptcha is now skinneable

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • recaptcharegisterplugin/0.11/recaptcharegister/templates/recaptcharegister.html

    r4252 r4283  
    4646          </div> 
    4747          <div> 
     48            <script> 
     49              var RecaptchaOptions = { 
     50                  theme : '$recaptcha_theme' 
     51              }; 
     52            </script> 
    4853            ${Markup(recaptcha_javascript)} 
    4954          </div> 
  • recaptcharegisterplugin/0.11/recaptcharegister/web_ui.py

    r4254 r4283  
    1010    private_key = Option('recaptcha', 'private_key', 
    1111        doc='The private key given to you from the reCAPTCHA site') 
     12    theme = Option('recaptcha', 'theme', default='white', 
     13        doc='Can be red, white (default), blackglass, clean or custom. Please see http://wiki.recaptcha.net/index.php/Theme') 
    1214 
    1315    def check_config(self): 
    1416        if not self.public_key or not self.private_key: 
    1517            raise ConfigurationError('public_key and private_key needs ' \ 
    16                 'to be in the [captcha] section of your trac.ini file. ' \ 
     18                'to be in the [recaptcha] section of your trac.ini file. ' \ 
    1719                'Get these keys from http://recaptcha.net/') 
    1820 
     
    3335                data['registration_error'] = 'Captcha incorrect. Please try again.' 
    3436                data['recaptcha_javascript'] = captcha.displayhtml(self.public_key) 
     37                data['recaptcha_theme'] = self.theme 
    3538                return "recaptcharegister.html", data, None 
    3639            else: 
    3740                ret = super(RecaptchaRegistrationModule, self).process_request(req) 
    3841                h, data, n = ret 
     42                data['recaptcha_theme'] = self.theme 
    3943                return "recaptcharegister.html", data, n 
    4044        else: 
     
    4246            h, data, n = ret 
    4347            data['recaptcha_javascript'] = captcha.displayhtml(self.public_key) 
     48            data['recaptcha_theme'] = self.theme 
    4449            return "recaptcharegister.html", data, n 
    4550 
  • recaptcharegisterplugin/0.11/setup.py

    r4254 r4283  
    33setup( 
    44    name = 'TracRecaptchaRegister', 
    5     version = '0.2.1', 
     5    version = '0.2.1.1', 
    66    author = 'Alejandro J. Cura', 
    77    author_email = 'alecu@vortech.com.ar',