# Copyright © 2004 Saugus.net, Inc. # All Rights Reserved. # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. if effective_date: context.setEffectiveDate(effective_date) try: from Products.CMFDefault.utils import scrubHTML text = scrubHTML( text ) # Strip Javascript, etc. description = scrubHTML( description ) context.edit(text=text, description=description, text_format=text_format) qst='portal_status_message=Log+Entry+changed.' if choice == ' Change and View ': target_action = context.getTypeInfo().getActionById( 'view' ) else: target_action = context.getTypeInfo().getActionById( 'edit' ) context.manage_changeProperties({'title':title, 'formatted_title':formatted_title, 'long_description':long_description, 'contact_name':contact_name, 'contact_email':contact_email, 'contact_phone':contact_phone, 'contact_fax':contact_fax, 'contact_night_phone':contact_night_phone, 'contact_town':contact_town, 'contact_state':contact_state, 'contact_country':contact_country, 'rank':rank, 'private_email':private_email, 'html_allowed':html_allowed}) context.setTitle(title) context.setDescription(description) context.REQUEST.RESPONSE.redirect( '%s/%s?%s' % ( context.absolute_url() , target_action , qst ) ) except Exception, msg: target_action = context.getTypeInfo().getActionById( 'edit' ) context.REQUEST.RESPONSE.redirect( '%s/%s?portal_status_message=%s' % ( context.absolute_url() , target_action , msg ) )