File: setuphandlers.py

package info (click to toggle)
zope-atextensions 0.9.2-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 468 kB
  • ctags: 327
  • sloc: python: 1,868; xml: 362; makefile: 31; sh: 5
file content (24 lines) | stat: -rw-r--r-- 907 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# an 'import_various' step to deal with form controller settings
# as there seems to be no support for doing this via GS at the moment
# (March 12, 2007)

def importVarious(context):
    """ Import various settings for ATExtensions

    This provisional handler will be removed again as soon as
    full handlers are implemented for this step.
    """
    site = context.getSite()
    pfc = site.portal_form_controller
    pfc.addFormValidators('base_edit',
                          '',   # context_type
                          'more',
                          '')   # validators
    pfc.addFormAction('base_edit',
                      'success',
                      '',    # context_type
                      'more',
                      'traverse_to',
                      'string:more_edit')
    return "Added validator and action for the 'more' button to " \
           "the form controller."