Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"""
Implementation of an OpenPlans-specific page type, based on
RichDocument w/ interface changes and wicked support.
"""
from Products.Archetypes.public import registerType
from Products.Archetypes.public import Schema
from Products.Archetypes.public import BooleanField
from Products.RichDocument.content.richdocument import RichDocument
from Products.RichDocument.widgets.attachments import AttachmentsManagerWidget
from wicked.atcontent.wickeddoc import WickedDoc
from opencore.interfaces import IOpenPage
from opencore.configuration import PROJECTNAME
from zope.interface import implements
schema = WickedDoc.schema.copy()
hidden_fields = ('relatedItems', 'allowDiscussion')
for fld in hidden_fields:
schema[fld].widget.visible={'edit': 'invisible',
'view': 'invisible',
}
schema['text'].scope = 'getContainerPath'
schema['text'].widget.macro = "binsmart_rich"
schema['text'].widget.helper_js = ("toggle_editor.js",)
schema['text'].allowable_content_types = ('text/html',)
schema['text'].default_output_type = 'text/html'
schema['description'].widget.rows = 1
# Prevent bug 1689 from occurring with pages too.