[CMF-checkins] CVS: Products/CMFDefault/skins/zpt_control - change_password.py:1.1 disableSyndication.py:1.1 editSynProperties.py:1.1 enableSyndication.py:1.1 isDiscussable.py:1.1 logout.py:1.1 mail_password.py:1.1 personalize.py:1.1 reconfig.py:1.1 undo.py:1.1

Yvo Schubbe y.2004_ at wcm-solutions.de
Tue Jul 6 17:45:16 EDT 2004


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

Added Files:
	change_password.py disableSyndication.py editSynProperties.py 
	enableSyndication.py isDiscussable.py logout.py 
	mail_password.py personalize.py reconfig.py undo.py 
Log Message:
- copied files to remove dependency on skins/control


=== Added File Products/CMFDefault/skins/zpt_control/change_password.py ===
## Script (Python) "change_password"
##title=Action to change password
##parameters=password, confirm, domains=None
mt = context.portal_membership
failMessage=context.portal_registration.testPasswordValidity(password, confirm)

if failMessage:
  return context.password_form(context,
                               context.REQUEST,
                               error=failMessage)
member = mt.getAuthenticatedMember()
mt.setPassword(password, domains)
mt.credentialsChanged(password)
return context.personalize_form(context,
                                context.REQUEST,
                                portal_status_message='Password changed.')


=== Added File Products/CMFDefault/skins/zpt_control/disableSyndication.py ===
## Script (Python) "disableSyndication"
##title=Disable Syndication for a resource
##parameters=

if context.portal_syndication.isSyndicationAllowed(context):
  context.portal_syndication.disableSyndication(context)
  return context.REQUEST.RESPONSE.redirect(context.absolute_url() + '/synPropertiesForm?portal_status_message=Syndication+Disabled')
else:
  return context.REQUEST.RESPONSE.redirect(context.absolute_url() + '/synPropertiesForm?portal_status_message=Syndication+Not+Allowed')


=== Added File Products/CMFDefault/skins/zpt_control/editSynProperties.py ===
## Script (Python) "editSynProperties"
##title=Enable Syndication for a resource
##parameters=
REQUEST=context.REQUEST
pSyn = context.portal_syndication
pSyn.editSyInformationProperties(context, REQUEST['updatePeriod'], REQUEST['updateFrequency'], REQUEST['updateBase'], REQUEST['max_items'], REQUEST)
return REQUEST.RESPONSE.redirect(context.absolute_url() + '/synPropertiesForm?portal_status_message=Syndication+Properties+Updated.')


=== Added File Products/CMFDefault/skins/zpt_control/enableSyndication.py ===
## Script (Python) "enableSyndication"
##title=Enable Syndication for a resource
##parameters=

if context.portal_syndication.isSiteSyndicationAllowed():
  context.portal_syndication.enableSyndication(context)
  return context.REQUEST.RESPONSE.redirect(context.absolute_url() + '/synPropertiesForm?portal_status_message=Syndication+Enabled')
else:
  return context.REQUEST.RESPONSE.redirect(context.absolute_url() + '/synPropertiesForm?portal_status_message=Syndication+Not+Allowed')



=== Added File Products/CMFDefault/skins/zpt_control/isDiscussable.py ===
## Script (Python) "isDiscussable"
##title=Return whether the context is discussable or not.
##parameters=
if hasattr(context, 'allow_discussion'):
    return context.allow_discussion
else:
    return None


=== Added File Products/CMFDefault/skins/zpt_control/logout.py ===
## Script (Python) "logout"
##title=Logout handler
##parameters=
REQUEST = context.REQUEST
if REQUEST.has_key('portal_skin'):
   context.portal_skins.clearSkinCookie()
REQUEST.RESPONSE.expireCookie('__ac', path='/')
return REQUEST.RESPONSE.redirect(REQUEST.URL1+'/logged_out')


=== Added File Products/CMFDefault/skins/zpt_control/mail_password.py ===
## Script (Python) "mail_password"
##title=Mail a user's password
##parameters=
REQUEST=context.REQUEST
return context.portal_registration.mailPassword(REQUEST['userid'], REQUEST)


=== Added File Products/CMFDefault/skins/zpt_control/personalize.py ===
## Script (Python) "personalize"
##title=Personalization Handler.
##parameters=
REQUEST=context.REQUEST
member = context.portal_membership.getAuthenticatedMember()

failMessage = context.portal_registration.testPropertiesValidity(REQUEST,
                                                                 member)
if failMessage:
    REQUEST.set('portal_status_message', failMessage)
    return context.personalize_form(context, REQUEST,
                                    portal_status_message=failMessage)

member.setProperties(REQUEST)

if REQUEST.has_key('portal_skin'):
    context.portal_skins.updateSkinCookie()

qs = '/personalize_form?portal_status_message=Member+changed.'

context.REQUEST.RESPONSE.redirect(context.portal_url() + qs)


=== Added File Products/CMFDefault/skins/zpt_control/reconfig.py ===
## Script (Python) "reconfig"
##title=Reconfigure Portal
##parameters=
REQUEST=context.REQUEST
context.portal_properties.editProperties(REQUEST)
return REQUEST.RESPONSE.redirect(context.portal_url() + '/reconfig_form?portal_status_message=CMF+Settings+changed.')


=== Added File Products/CMFDefault/skins/zpt_control/undo.py ===
## Script (Python) "undo"
##title=Undo transactions
##parameters=transaction_info
context.portal_undo.undo(context, transaction_info)

return context.REQUEST.RESPONSE.redirect(
    'folder_contents?portal_status_message=Transaction(s)+undone' )



More information about the CMF-checkins mailing list