Changeset 1084 in products


Ignore:
Timestamp:
Jul 14, 2009 7:06:51 PM (15 years ago)
Author:
liebster
Message:

Added support of Plone 3.2 version

Location:
qPloneCaptchas/trunk
Files:
15 added
12 edited

Legend:

Unmodified
Added
Removed
  • qPloneCaptchas/trunk/Extensions/Install.py

    r241 r1084  
    2727    if not 'qPloneCaptchas' in pp.objectIds(): 
    2828        pp.addPropertySheet(id='qPloneCaptchas', title= '%s Properties' % 'qPloneCaptchas') 
    29         out.write("Adding %s property sheet to portal_properies\n" % 'qPloneComments' ) 
     29        out.write("Adding %s property sheet to portal_properies\n" % 'qPloneCaptchas' ) 
    3030    props_sheet = pp['qPloneCaptchas'] 
    3131    updateProperties(props_sheet, out, PROPERTIES) 
     
    4848    elif plone_version.startswith('3.1'): 
    4949        plone_version = '3.1' 
     50    elif plone_version.startswith('3.2'): 
     51        plone_version = '3.2' 
    5052    else: 
    51         raise Exception("Error - Unsupported version. Suported versions: Plone 2.0.5-3") 
     53        raise Exception("Error - Unsupported version. Suported versions: Plone 2.0.5-3.2") 
    5254 
    5355    DiscussionLayer = LAYER_DISCUSSION 
  • qPloneCaptchas/trunk/HISTORY.txt

    r694 r1084  
     11.3.6 - Unrealised 
     2===================== 
     3 
     4  * Added support of Plone 3.2 version 
     5   
     6  * Cleaned up code 
     7 
     8 
    191.3.5 - Unrealised 
    210===================== 
  • qPloneCaptchas/trunk/i18n/qplonecaptchas-ja.po

    r111 r1084  
    6868msgstr "ランダムな値を使用" 
    6969 
     70#. Default: "Dynamic captchas image setup options" 
     71#:  
     72msgid "legend_dynamic_captchas_options" 
     73msgstr "Captcha 画像の自動生成オプション" 
  • qPloneCaptchas/trunk/i18n/qplonecaptchas-uk.po

    r1 r1084  
    2828msgid "Please re-enter validation code." 
    2929msgstr "Будь ласка введіть ще раз код перевірки" 
     30 
     31#. Default: "Dynamic captchas image setup options" 
     32#:  
     33msgid "legend_dynamic_captchas_options" 
     34msgstr "Налаштування динамічних captcha" 
     35 
  • qPloneCaptchas/trunk/i18n/qplonecaptchas.pot

    r1 r1084  
    2828msgid "Please re-enter validation code." 
    2929msgstr "" 
     30 
     31#. Default: "Dynamic captchas image setup options" 
     32#:  
     33msgid "legend_dynamic_captchas_options" 
     34msgstr "" 
  • qPloneCaptchas/trunk/skins/captchas_join_form/3.1/join_form.cpt

    r241 r1084  
    234234    <input type="hidden" name="form.submitted" value="1" /> 
    235235 
    236     <input tal:replace="structure context/@@authenticator/authenticator" /> 
     236    <input tal:replace="structure context/@@authenticator/authenticator|nothing" /> 
    237237 
    238238  </form> 
  • qPloneCaptchas/trunk/skins/plone_captchas/captcha_widget.pt

    r1 r1084  
    1111     <label i18n:translate="enter_word">Enter the word below</label> 
    1212     <span class="fieldRequired" title="Required" 
    13            i18n:attributes="title title_required;" 
     13           i18n:domain="plone" i18n:attributes="title title_required;" 
    1414           i18n:translate="label_required">(Required)</span> 
    1515     <div class="formHelp"></div> 
  • qPloneCaptchas/trunk/skins/plone_captchas/dynamic/captcha_validator.vpy

    r1 r1084  
    1 from Products.qPloneCaptchas import ProductMessageFactory 
     1from Products.qPloneCaptchas import ProductMessageFactory as _ 
    22from Products.qPloneCaptchas.utils import decrypt, parseKey, \ 
    33     encrypt1, getWord 
     
    2222if (enc != solution) or (captcha_tool.has_key(decrypted_key)) \ 
    2323    or (DateTime().timeTime() - float(date)>3600): 
    24     state.setError('key', ProductMessageFactory("Please re-enter validation code."), 'key_required') 
    25     return state.set(status="failure", portal_status_message = ProductMessageFactory("Please re-enter validation code.")) 
     24    message = _(u"Please re-enter validation code.") 
     25    context.plone_utils.addPortalMessage(message, 'error') 
     26    state.setError('key', message, 'key_required') 
     27    return state.set(status="failure") 
    2628else: 
    2729    captcha_tool.addExpiredKey(decrypted_key) 
  • qPloneCaptchas/trunk/skins/plone_captchas/prefs_captchas_setup.cpy

    r60 r1084  
    1010## 
    1111from Products.CMFCore.utils import getToolByName 
     12from Products.CMFPlone import PloneMessageFactory as _ 
     13 
    1214import string 
    1315 
     
    5052captcha_props.manage_changeProperties(**kw) 
    5153 
    52 return state.set(portal_status_message = 'Changes saved.') 
     54context.plone_utils.addPortalMessage(_(u'Changes saved.')) 
     55return state 
  • qPloneCaptchas/trunk/skins/plone_captchas/prefs_captchas_setup_form.cpt

    r1 r1084  
    1 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" 
    2       lang="en" 
     1<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" 
     2      xmlns:tal="http://xml.zope.org/namespaces/tal" 
     3      xmlns:metal="http://xml.zope.org/namespaces/metal" 
     4      xmlns:i18n="http://xml.zope.org/namespaces/i18n" 
    35      i18n:domain="plonecaptchas" 
    46      metal:use-macro="here/prefs_main_template/macros/master"> 
     
    1214     tal:define="errors python:request.get('controller_state', None).getErrors();"> 
    1315 
    14     <div metal:define-macro="main" i18n:domain="plonecaptchas"> 
     16    <div metal:define-macro="main"> 
    1517    <div class="configlet"> 
    1618        <h1 i18n:translate="heading_comments_setup">Plone Captchas Setup</h1> 
     
    3840                           value="static" 
    3941                           tal:attributes="checked python:test(ct=='static', 'checked', '')"/> 
    40                     <label for="use_static_captchas">Use static captchas</label> 
     42                    <label i18n:translate="use_static_captchas" for="use_static_captchas">Use static captchas</label> 
    4143                    <br /> 
    4244                    <input name="static_captchas" 
    4345                           id="use_dynamic_captchas" 
    4446                           type="radio" 
    45                            disabled="" 
    4647                           value="dynamic" 
    47                            tal:attributes="checked python:test(ct=='dynamic', 'checked', ''); 
    48                                            disabled python:test(context.checkPIL(), '', 'disabled');"/> 
    49                     <label for="use_dynamic_captchas">Use dynamic captchas</label> 
     48                           tal:attributes="checked python:test(ct=='dynamic', 'checked', '');"/> 
     49                    <label i18n:translate="use_dynamic_captchas" for="use_dynamic_captchas">Use dynamic captchas</label> 
    5050                </div> 
    5151            </fieldset> 
    5252 
    5353            <fieldset tal:define="props_sheet here/portal_properties/qPloneCaptchas"> 
    54                 <legend i18n:translate="legend_setup_options">Dynamic captchas image setup options</legend> 
     54                <legend i18n:translate="legend_dynamic_captchas_options">Dynamic captchas image setup options</legend> 
    5555 
    5656                <div class="field" 
     
    6868                                           tabindex tabindex/next;"/> 
    6969 
    70                     <label i18n:translate="string:${property_id}" 
     70                    <label i18n:translate="" 
    7171                           for="" 
    7272                           tal:attributes="for string:${property_id}"> 
     
    8989                                           tabindex tabindex/next;"/> 
    9090 
    91                     <label i18n:translate="string:${property_id}" 
     91                    <label i18n:translate="" 
    9292                           for="" 
    9393                           tal:attributes="for string:${property_id}"> 
     
    110110                                           tabindex tabindex/next;"/> 
    111111 
    112                     <label i18n:translate="string:${property_id}" 
     112                    <label i18n:translate="" 
    113113                           for="" 
    114114                           tal:attributes="for string:${property_id}"> 
     
    131131                                           tabindex tabindex/next;"/> 
    132132 
    133                     <label i18n:translate="string:${property_id}" 
     133                    <label i18n:translate="" 
    134134                           for="" 
    135135                           tal:attributes="for string:${property_id}"> 
     
    152152                                           tabindex tabindex/next;"/> 
    153153 
    154                     <label i18n:translate="string:${property_id}" 
     154                    <label i18n:translate="" 
    155155                           for="" 
    156156                           tal:attributes="for string:${property_id}"> 
     
    174174                                           checked prop_value"/> 
    175175 
    176                     <label i18n:translate="string:${property_id}" 
     176                    <label i18n:translate="" 
    177177                           for="" 
    178178                           tal:attributes="for string:${property_id}"> 
     
    190190                       name="form.button.form_submit" 
    191191                       value="Save" 
     192                       i18n:domain="plone" 
    192193                       i18n:attributes="value" 
    193194                       tal:attributes="tabindex tabindex/next;"/> 
  • qPloneCaptchas/trunk/skins/plone_captchas/static/captcha_validator.vpy

    r1 r1084  
    1 from Products.qPloneCaptchas import ProductMessageFactory 
     1from DateTime import DateTime 
     2 
    23from Products.CMFCore.utils import getToolByName 
     4 
     5from Products.qPloneCaptchas import ProductMessageFactory as _ 
    36from Products.qPloneCaptchas.utils import decrypt, parseKey, \ 
    47     encrypt1, getWord 
    5 from DateTime import DateTime 
    68 
    79if state.getStatus()=='failure': 
     
    2325if (enc != solution) or (captcha_tool.has_key(decrypted_key)) \ 
    2426    or (DateTime().timeTime() - float(date)>3600): 
    25     state.setError('key', ProductMessageFactory("Please re-enter validation code."), 'key_required') 
    26     return state.set(status="failure", portal_status_message = ProductMessageFactory("Please re-enter validation code.")) 
     27    message = _(u"Please re-enter validation code.") 
     28    context.plone_utils.addPortalMessage(message, 'error') 
     29    state.setError('key', message, 'key_required') 
     30    return state.set(status="failure") 
    2731else: 
    2832    captcha_tool.addExpiredKey(decrypted_key) 
  • qPloneCaptchas/trunk/version.txt

    r694 r1084  
    1 1.3.5 
     11.3.6 
Note: See TracChangeset for help on using the changeset viewer.