[CMF-checkins] CVS: Products/CMFDefault/skins/zpt_control - folder_add_control.py:1.1 validateId.py:1.1 validateType.py:1.1

Yvo Schubbe y.2004_ at wcm-solutions.de
Tue Aug 3 10:28:21 EDT 2004


Update of /cvs-repository/Products/CMFDefault/skins/zpt_control
In directory cvs.zope.org:/tmp/cvs-serv17409/CMFDefault/skins/zpt_control

Added Files:
	folder_add_control.py validateId.py validateType.py 
Log Message:
- refactored folder_factories to avoid ugly error pages
- marked unauthRedirect as deprecated


=== Added File Products/CMFDefault/skins/zpt_control/folder_add_control.py ===
##parameters=type_name, id, **kw
##title=Add an object to a folder
##
context.invokeFactory(type_name, id, context.REQUEST.RESPONSE)

return context.setStatus(True)


=== Added File Products/CMFDefault/skins/zpt_control/validateId.py ===
##parameters=id='', **kw
##title=
##
if id:
    if context.checkIdAvailable(id):
        return context.setStatus(True)
    else:
        return context.setStatus(False, 'Please choose another ID.')
else:
    return context.setStatus(False, 'Please enter an ID.')


=== Added File Products/CMFDefault/skins/zpt_control/validateType.py ===
##parameters=type_name='', **kw
##title=
##
if type_name:
    return context.setStatus(True)
else:
    return context.setStatus(False, 'Please select a content type.')



More information about the CMF-checkins mailing list