Changeset 3696 in products


Ignore:
Timestamp:
Jul 8, 2013 7:47:23 AM (11 years ago)
Author:
potar
Message:

add Plone 3.0 compatibility

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.formlib.captcha/trunk/quintagroup/formlib/captcha/widget.py

    r3691 r3696  
    2626    # The implementation of inline validation was switched 
    2727    # to a non-KSS-based in plone.app.form-2.2.0 
    28     from plone.app.form.kss import validation as inline_validation 
     28    try: 
     29        from plone.app.form.kss import validation as inline_validation 
     30    # BBB: Plone 3.0 compatibility. 
     31    # The KSS validation was added in plone.app.form-1.1.0. 
     32    except: 
     33        inline_validation = None 
    2934 
    3035_ = MessageFactory('quintagroup.formlib.captcha') 
     
    8994        # Captcha validation is one-time process to prevent hacking 
    9095        # This is the reason for in-line validation to be disabled. 
    91         if detectInlineValidation(inline_validation): 
     96        if inline_validation and detectInlineValidation(inline_validation): 
    9297            return input 
    9398 
Note: See TracChangeset for help on using the changeset viewer.