), ), StringField( name='question', required=True, widget=StringWidget( label='Title', label_msgid='eea.soer_label_questions', i18n_domain='eea.soer', description='Custom title for this report', ), ), ), ) schema = getattr(SOERReport, 'schema').copy() + schema.copy() schema['title'].required = False class FlexibilityReport(SOERReport): """ Flexibility Report """ security = ClassSecurityInfo() __implements__ = (getattr(SOERReport, '__implements__', ()), ) implements(IFlexibilityReport) meta_type = 'FlexibilityReport' portal_type = 'FlexibilityReport' schema = schema default_view = 'flexibility_report_view'
ImageField('image', required=False, sizes={ 'mini': (40, 40), 'thumb': (80, 80), }, storage=FileSystemStorage(), widget=ImageWidget()), TextField('text', required=False, storage=FileSystemStorage(), widget=TextAreaWidget()), ), marshall=PrimaryFieldMarshaller()) FSSItemSchema = BaseSchema.copy() + BaseItemShema.copy() ATFSSItemSchema = ATContentTypeSchema.copy() + BaseItemShema.copy() class FSSItem(BaseContent): """A simple item using FileSystemStorage""" archetypes_name = portal_type = meta_type = 'FSSItem' schema = FSSItemSchema _at_rename_after_creation = True registerType(FSSItem, PROJECTNAME) class ATFSSItem(ATCTContent): """A simple item using FileSystemStorage base on ATContentypes"""
widget=SelectionWidget( label='Evaluation', label_msgid='label_evaluation', description='This is a two letter value which indicates quickly ' 'what the evaluation and trend is.', visible={ 'view': 'invisible', 'edit': 'invisible' }, format='select', ), vocabulary='getEvaluationVocabulary', ), ), ) schema = getattr(ATFolder, 'schema', Schema(())).copy() + schema.copy() schema['title'].default = 'not_set_yet' schema['title'].required = 0 schema['title'].widget.visible = {'edit': 'invisible'} schema['description'].widget.description = \ '(Optional) ' + schema['description'].widget.description schema['soerCountry'].default_method = 'default_country' schema['relatedItems'].widget.visible = {'edit': 'visible'} schema['relatedItems'].schemata = 'metadata' class SOERReport(ATFolder, ATNewsItem): """ SOER Report """ security = ClassSecurityInfo() __implements__ = (getattr(ATFolder, '__implements__', ()), )
default=u'http://www.eea.europa.eu/soer/evaluations#XX', widget=SelectionWidget( label='Evaluation', label_msgid='label_evaluation', description='This is a two letter value which indicates quickly ' 'what the evaluation and trend is.', visible={'view' : 'invisible', 'edit' : 'invisible'}, format='select', ), vocabulary='getEvaluationVocabulary', ), ), ) schema = getattr(ATFolder, 'schema', Schema(())).copy() + schema.copy() schema['title'].default = 'not_set_yet' schema['title'].required = 0 schema['title'].widget.visible = {'edit' : 'invisible'} schema['description'].widget.description = \ '(Optional) ' + schema['description'].widget.description schema['soerCountry'].default_method = 'default_country' schema['relatedItems'].widget.visible = {'edit' : 'visible'} schema['relatedItems'].schemata = 'metadata' class SOERReport(ATFolder, ATNewsItem): """ SOER Report """ security = ClassSecurityInfo() __implements__ = (getattr(ATFolder, '__implements__', ()), ) implements(ISOERReport)
# not 'roles' b/c 'validate_roles' exists; stoopid Archetypes name="roles_", accessor='getRoles', languageIndependent=1, vocabulary='getRoleSet', multiValued=1, widget=MultiSelectionWidget( label=_(u"Roles"), description=_(u"Roles that members of this group should receive."), visible = False ), ), ),) SimpleSchema = getattr(ATBTreeFolder, 'schema', Schema(())).copy() + schema.copy() # Ugly hack to hide metadata fields for field in SimpleSchema.fields(): if field.isMetadata: field.schemata = 'default' field.widget.visible = False DescField = SimpleSchema['description'] DescField.widget.visible = True AdminField = SimpleSchema['administators'] AdminField.widget.label=_(u'Administrators') InstField = SimpleSchema['instuctors'] InstField.widget.label=_(u'Instructors')
i18n_domain="plone", show_content_type=False,)), ImageField('image', required=False, sizes={ 'mini':(40,40), 'thumb':(80,80),}, storage=FileSystemStorage(), widget=ImageWidget()), TextField('text', required=False, storage=FileSystemStorage(), widget=TextAreaWidget()), ), marshall=PrimaryFieldMarshaller()) FSSItemSchema = BaseSchema.copy() + BaseItemShema.copy() ATFSSItemSchema = ATContentTypeSchema.copy() + BaseItemShema.copy() class FSSItem(BaseContent): """A simple item using FileSystemStorage""" archetypes_name = portal_type = meta_type = 'FSSItem' schema = FSSItemSchema _at_rename_after_creation = True registerType(FSSItem, PROJECTNAME) class ATFSSItem(ATCTContent): """A simple item using FileSystemStorage base on ATContentypes""" archetypes_name = portal_type = meta_type = 'ATFSSItem' schema = ATFSSItemSchema