Changeset 658

Show
Ignore:
Timestamp:
11/27/06 07:11:27
Author:
crchemist
Message:

Delete captchas property sheet.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • qPloneCaptchas/trunk/Extensions/Install.py

    r657 r658  
    2020    safeEditProperty(self, 'captcha_key', generateKey(8)) 
    2121 
    22     # add Property sheet to portal_properies 
    23     pp = getToolByName(self, 'portal_properties') 
    24     if not 'qPloneCaptchas' in pp.objectIds(): 
    25         pp.addPropertySheet(id='qPloneCaptchas', title= '%s Properties' % 'qPloneCaptchas') 
    26         out.write("Adding %s property sheet to portal_properies\n" % 'qPloneComments' ) 
    27     props_sheet = pp['qPloneCaptchas'] 
    28     updateProperties(props_sheet, out, PROPERTIES) 
    29  
    3022    Layers = [] 
    3123    Layers += LAYERS 
    32  
    33     if pp.qPloneCaptchas.getProperty('static_captchas', False) and havePIL: 
    34         Layers.append(LAYER_DYNAMIC_CAPTCHAS) 
    35     else: 
    36         Layers.append(LAYER_STATIC_CAPTCHAS) 
     24    Layers.append(LAYER_DYNAMIC_CAPTCHAS) 
    3725 
    3826    mtool = getToolByName(self, 'portal_migration') 
     
    10189    controlpanel_tool = getToolByName(self, 'portal_controlpanel') 
    10290    controlpanel_tool.unregisterConfiglet(CONFIGLET_ID) 
    103     # Remove Product's property sheet from portal_properties 
    104     pp = getToolByName(self, 'portal_properties') 
    105     if 'qPloneCaptchas' in pp.objectIds(): 
    106         pp.manage_delObjects(ids=['qPloneCaptchas',]) 
    107  
    10891 
    10992def updateProperties(pp_ps, out, *args): 
  • qPloneCaptchas/trunk/skins/plone_captchas/prefs_captchas_setup.cpy

    r657 r658  
    2626 
    2727form = context.REQUEST.form 
    28 sc = form['static_captchas'] 
    29 if sc == 'True': 
     28ct = form['static_captchas'] 
     29if ct == 'static': 
    3030    exchangeLayers('plone_captchas/dynamic', 'plone_captchas/static') 
    3131    layer = 'static' 
  • qPloneCaptchas/trunk/skins/plone_captchas/prefs_captchas_setup_form.cpt

    r657 r658  
    3636            <fieldset> 
    3737                <legend i18n:translate="legend_setup_options">qPloneCaptchas setup options</legend> 
    38                 <div tal:define="sc here/portal_properties/qPloneCaptchas/static_captchas;"> 
     38                <div tal:define="ct here/getCaptchaType;"> 
    3939                    <input name="static_captchas" 
    4040                           id="use_static_captchas" 
    4141                           type="radio" 
    42                            tal:attributes="value sc
    43                                            checked python:test(sc, 'checked', '')"/> 
     42                           tal:attributes="value ct
     43                                           checked python:test(ct=='static', 'checked', '')"/> 
    4444                    <label for="use_static_captchas">Use static captchas</label> 
    4545                    <br /> 
     
    4848                           type="radio" 
    4949                           disabled="" 
    50                            tal:attributes="value python:not sc
    51                                            checked python:test(not sc, 'checked', ''); 
     50                           tal:attributes="value ct
     51                                           checked python:test(ct=='dynamic', 'checked', ''); 
    5252                                           disabled python:test(context.checkPIL(), '', 'disabled');"/> 
    5353                    <label for="use_dynamic_captchas">Use dynamic captchas</label>