class LandItemExtender(object): """ Extender for LandItem """ implements(ISchemaExtender) fields = [ TextField("text", schemata="default", primary=True, allowable_content_types=('text/html', ), default_content_type='text/html', default_output_type='text/html', widget=atapi.RichWidget( label=_("Metadata"), description=_("Metadata for this item"))), StringField("embed", schemata="default", widget=atapi.TextAreaWidget( label=_("Map View"), description=_("Paste here the code provided " "by your webservice (iframe, jscode)"))), TextField( "webservices", schemata="default", primary=False, allowable_content_types=('text/html', ), default_content_type='text/html', default_output_type='text/html', widget=atapi.RichWidget( label=_("Web Map Services"), description=_("Web Map Services available for this data"))), TextField("download", schemata="default", primary=False, allowable_content_types=('text/html', ), default_content_type='text/html', default_output_type='text/html', widget=atapi.RichWidget( label=_("Download"), description=_("Download information"))), ImageField("legend", schemata="default", sizes=None, widget=atapi.ImageWidget( label=_("Legend"), description=_("Image for Legend"))), ] def __init__(self, context): self.context = context def getFields(self): return self.fields
class AnalyticsLineageExtender(object): adapts(IChildSite) implements(IOrderableSchemaExtender, IBrowserLayerAwareExtender) layer = IZentraalLineageLayer fields = [ ExtenderTextField('analytics', required=False, widget = atapi.TextAreaWidget( label=_(u"Local Analytics Code"), rows=20, ), default_output_type="text/html", allowable_content_types="text/html", default_content_type="text/html", ), ] def __init__(self, context): self.context = context def getFields(self): if IChildSite.providedBy(self.context): return self.fields return [] def getOrder(self, original): """ 'original' is a dictionary where the keys are the names of schemata and the values are lists of field names, in order. Move leadImage field just after the Description """ default = original.get('default', None) return original
from Products.Archetypes import atapi from Products.ATContentTypes.content import base from Products.ArchAddOn import public from Products.PloneServicesCenter import PSCMessageFactory as _ from Products.PloneServicesCenter.validators import IndustriesValidator from Products.PloneServicesCenter.content import country servicesSchema = atapi.BaseSchema + atapi.Schema(( atapi.StringField( 'description', accessor='Description', widget=atapi.TextAreaWidget( label=_(u"label_psc_description", default=u"Description"), description=_(u"help_psc_description", default=u""), i18n_domain='ploneservicescenter', ), required=1, searchable=1, ), atapi.StringField( 'country', vocabulary=country.vocab, validateVocabulary=True, countries=country.countries, widget=atapi.SelectionWidget( label=_(u"label_psc_country_cat", default=u"Country"), description=_(u"help_services_country", default=u"Select a country"), i18n_domain='ploneservicescenter',
atapi.LinesField( 'selectionlinesfield2', vocabulary='_get_selection_vocab', widget=atapi.SelectionWidget(label='Selection', i18n_domain="attesti18n"), ), atapi.LinesField( 'selectionlinesfield3', vocabulary='_get_selection_vocab2', widget=atapi.MultiSelectionWidget(label='MultiSelection', i18n_domain="attesti18n"), ), atapi.TextField( 'textarea_appendonly', widget=atapi.TextAreaWidget( label='TextArea', append_only=1, ), ), atapi.TextField( 'textarea_appendonly_timestamp', widget=atapi.TextAreaWidget( label='TextArea', append_only=1, timestamp=1, ), ), atapi.TextField( 'textarea_maxlength', widget=atapi.TextAreaWidget( label='TextArea', maxlength=20,
from Products.ATContentTypes.content import document from plone.app.form.widgets.uberselectionwidget import UberSelectionWidget # -*- Message Factory Imported Here -*- from Products.DssPageTypes.interfaces import IDssContact from Products.DssPageTypes.config import PROJECTNAME from Products.ATExtensions.ateapi import * DssContactSchema = document.ATDocumentSchema.copy() + atapi.Schema(( atapi.TextField( name="mapurl", max_size="500", widget=atapi.TextAreaWidget( label=u"Map URL", description= u"Paste Google Map URL in here, no iframe tag or quotes", rows="5", ), ), atapi.StringField( name="mapwidth", widget=atapi.StringWidget( label=u"Map Width", description=u"IFrame Map Width", ), ), atapi.StringField( name="mapheight", widget=atapi.StringWidget( label=u"Map Height", description=u"IFrame Map Height",
name='responsavel', required=False, widget=atapi.StringWidget( label=_(u'Responsavel'), description=_(u'') ), ), atapi.TextField( name='mensagem', required=False, searchable=True, storage=atapi.AnnotationStorage(migrate=True), widget=atapi.TextAreaWidget( label=_(u'Mensagem'), description=_(u''), rows=5, ), ), )) schemata.finalizeATCTSchema(MensagemSchema) class Mensagem(ATCTContent): """ Classe do conteudo Mensagem """ implements(IMensagem)
# -*- Message Factory Imported Here -*- from rendereasy.origineclub import origineclubMessageFactory as _ from rendereasy.origineclub.interfaces import ITexto from rendereasy.origineclub.config import PROJECTNAME TextoSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema(( # -*- Your Archetypes field definitions here ... -*- atapi.TextField( 'texto', storage=atapi.AnnotationStorage(), widget=atapi.TextAreaWidget( label=_(u"Texto"), ), required=True, ), atapi.IntegerField( 'tempo', storage=atapi.AnnotationStorage(), widget=atapi.IntegerWidget( label=_(u"Tempo"), description=_(u"Field description"), ), validators=('isInt'), ),
required=True, vocabulary='awardProceduresVocab', widget=atapi.SelectionWidget( label=_(u'award_procedures_label', default=u'Procedures for the award'), description=_(u'award_procedures_help', default=u"Select the award procedures"), ), ), atapi.TextField( 'note', required=False, storage=atapi.AnnotationStorage(migrate=True), widget=atapi.TextAreaWidget( label=_(u'note_label', default=u'Note'), rows=4, maxlength=400, ), ), )) ATCompensoSchema['title'].widget.label = _(u'title_label', default=u'Name of beneficiary') ATCompensoSchema['description'].widget.visible = False ATCompensoSchema['effectiveDate'].widget.description = _( u'effectiveDate_help', default= u'If you set this date the item will be visible starting from this date. If you do not insert the date the item will be published immediately with the action of publication.' ) ATCompensoSchema['effectiveDate'].widget.visible = { 'edit': 'invisible',
atapi.LinesField( name='jobTitles', widget=atapi.LinesField._properties['widget']( label=_(u"FacultyStaffDirectory_label_jobTitles", default=u"Job Titles"), description=_(u"FacultyStaffDirectory_description_jobTitles", default=u"One per line"), i18n_domain='FacultyStaffDirectory', ), schemata="Professional Information", searchable=True ), atapi.StringField( name='officeAddress', widget=atapi.TextAreaWidget( label=_(u"FacultyStaffDirectory_label_officeAddress", default=u"Office Street Address"), i18n_domain='FacultyStaffDirectory', ), schemata="Contact Information", searchable=True ), atapi.StringField( name='officeCity', widget=atapi.StringWidget( label=_(u"FacultyStaffDirectory_label_officeCity", default=u"Office City"), i18n_domain='FacultyStaffDirectory', ), schemata="Contact Information", searchable=True ),
)), atapi.StringField( 'veryGoodScoreTitle', schemata="Messages", storage=atapi.AnnotationStorage(), widget=atapi.StringWidget( label=_('Very good score title'), visible=0, ), ), atapi.StringField( 'veryGoodScoreMessage', schemata="Messages", storage=atapi.AnnotationStorage(), widget=atapi.TextAreaWidget( label=_(u'Very good score message'), visible=0, ), ), atapi.StringField( 'goodScoreTitle', schemata="Messages", storage=atapi.AnnotationStorage(), widget=atapi.StringWidget( label=_(u'Good score title'), visible=0, ), ), atapi.StringField( 'goodScoreMessage', schemata="Messages", storage=atapi.AnnotationStorage(),
TextoSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema(( atapi.LinesField( name='midia', widget=atapi.SelectionWidget( label="Mídia/Tipo de Matéria", description= "Selecione a Mídia/Tipo de Matéria a que este texto é destinado.", ), vocabulary='getListaMidias', required=True, ), atapi.TextField( name='texto', widget=atapi.TextAreaWidget( label="Texto", rows="15", ), allowable_content_types="('text/html','text/plain')", default_output_type="text/html", searchable=1, ), )) # Set storage on fields copied from ATFolderSchema, making sure # they work well with the python bridge properties. TextoSchema['title'].storage = atapi.AnnotationStorage() TextoSchema['title'].required = "False" TextoSchema['title'].widget.visible = { "edit": "invisible", "view": "invisible"
label=u'Short name', description= u"Should not contain spaces, underscores or mixed case. Short Name is part of the item's web address.", i18n_domain="collective.TemplateUploadCenter", ), ), atapi.TextField( 'description', default='', required=1, searchable=1, accessor="Description", #storage=MetadataStorage(), widget=atapi.TextAreaWidget( label=u'Project Summary', description=u'A short summary of the project.', i18n_domain="collective.TemplateUploadCenter", rows=5, ), ), atapi.TextField( 'text', default='', required=1, searchable=1, primary=1, default_content_type='text/plain', default_output_type='text/html', #allowable_content_types=config.TEXT_TYPES, widget=atapi.RichWidget( label=u'Full Project Description', description=u'The complete project description.',
widget=atapi.StringWidget(label=u'Surname', ), required=1), atapi.StringField(name='organisation', widget=atapi.StringWidget(label=u'Organisation', ), required=1), atapi.StringField( name='email', required=1, widget=atapi.StringWidget(label=u'Email', )), atapi.StringField( name="homepage", widget=atapi.StringWidget( label=u"Homepage", description=u"URL of personal or institutional homepage", ), ), atapi.TextField(name="postal", widget=atapi.TextAreaWidget(label="Postal Address", )), atapi.BooleanField( name="dinner", widget=atapi.BooleanWidget( label=u"Participation in the Workshop Dinner (at your own expense)", description=u"Dinner takes place at the restaurant 'Parlament'\ (http://www.parlament-hamburg.de)", ), ), )) class WorkshopFolder(atapi.BaseFolder): """ Workshop folder """
atapi.StringField( 'phone_number', storage=atapi.AnnotationStorage(), widget=atapi.StringWidget( label=_(u"Your Phone Number"), description='', ), required=True, default='', ), atapi.TextField( 'consequences', storage=atapi.AnnotationStorage(), widget=atapi.TextAreaWidget( label=_(u"What are the consequences if this project is not completed?"), rows=5, ), ), atapi.DateTimeField( 'ideal_date', storage=atapi.AnnotationStorage(), widget=atapi.CalendarWidget( label=_(u'Project Needed By'), format='%Y-%b-%d', show_hm=False, starting_year=time.localtime()[0], ), required=True, ),
widget = atapi.InAndOutWidget( label="Couverture géographique", size = 5) ), atapi.LinesField('public', required = True, vocabulary_factory = "istsida.vocabularies.publics", widget = atapi.InAndOutWidget( label="Public(s) ciblé(s)", description="Choisir le ou les publics cibles.", size = 10) ), atapi.TextField('updateContact', required = False, widget = atapi.TextAreaWidget( label = "Contact pour la mise à jour", description="Nom et coordonnées d’un contact pour la mise à jour de la fiche descriptive.", size = 5) ), atapi.DateTimeField('updateDate', default_method=DateTime, widget = atapi.CalendarWidget( label="Date de mise à jour", show_hm=False) ), )) SCOrganismSchema['title'].widget.label = "Nom de l'organisme" SCOrganismSchema['description'].widget.visible = {'edit':'invisible', 'view':'invisible'} class SCOrganism(base.ATCTContent): """Un organisme"""
), atapi.StringField( 'assignedTo', storage=atapi.AnnotationStorage(), widget=atapi.StringWidget( label=_(u"Assigned To"), description= _(u"The individuals or groups to whom this task has been assigned." ), ), ), atapi.TextField( 'comments', storage=atapi.AnnotationStorage(), widget=atapi.TextAreaWidget( label=_(u"Comments"), description=_(u"to this task here."), ), ), atapi.ReferenceField( 'milestone', widget=atapi.ReferenceWidget( label=_(u"Milestone"), description=_(u"The milestone set for this task."), format="select", ), allowed_types=('Milestone'), relationship='task_milestone', ), atapi.StringField('priority', storage=atapi.AnnotationStorage(), widget=atapi.SelectionWidget(
from Products.DataGridField.SelectColumn import SelectColumn from Products.DataGridField.DataGridField import FixedRow from ebc.pauta import pautaMessageFactory as _ from ebc.pauta.interfaces import IPauta from ebc.pauta.config import PROJECTNAME PautaSchema = folder.ATFolderSchema.copy() + atapi.Schema(( # -*- Your Archetypes field definitions here ... -*- atapi.TextField( name='pauta', widget=atapi.TextAreaWidget( label="Pauta", ), allowable_content_types="('text/html', 'text/plain')", default_output_type="text/html", searchable=1, required='true', ), atapi.TextField( name='enfoque', widget=atapi.TextAreaWidget( label="Enfoque", ), allowable_content_types="('text/html','text/plain')", default_output_type="text/html", searchable=1,
'title', storage=atapi.AnnotationStorage(), widget=atapi.StringWidget( label="Title", description="", ), default="", required=True, ), atapi.TextField( 'function', storage=atapi.AnnotationStorage(), widget=atapi.TextAreaWidget( label='Function', description='Function of instruction', rows = 5, ), default='', required=True, ), atapi.StringField( 'operation', storage=atapi.AnnotationStorage(), widget=atapi.StringWidget( label="Operation", description="How to run the instruction", size=50, ), default=_(u"Home > > >"),
default=u'Do not fill out anything below.'), )), atapi.TextField( 'chatWidget', required=False, searchable=False, default="", validators=(), allowable_content_types=('text/html', ), default_output_type='text/html', widget=atapi.TextAreaWidget( description= 'Insert Chat Code Snippet to contact this member. It can be a one-on-one chat or a department chat, ' + 'there are no restrictions. <br /> \n ' + 'Tip: tal:condition="context/getIsDeptChatWidget" tal:condition="not: context/getIsDeptChatWidget" <br /> \n ' + 'Visible ONLY for Portlet? Add this class "library_staff_port" <br /> \n ' + 'Visible ONLY for Staff Page? Add this class "library_staff_page" ', label=_(u'Ignore this area', default=u'Ignore this area'), )), atapi.BooleanField( 'isDeptChatWidget', required=False, searchable=False, default=True, validators=(), widget=atapi.BooleanWidget( description= 'If the chat widget is for the deparment check this box, if this is a one-on-one chat widget place uncheck.', label=_(u'Is this a Department Chat Widget?',
from Products.CMFCore.utils import getToolByName from zope.interface import implements from Products.EasyNewsletter import config from Products.EasyNewsletter.interfaces import IENLTemplate from Products.EasyNewsletter import EasyNewsletterMessageFactory as _ schema = atapi.BaseSchema + atapi.Schema(( ZPTField( 'body', validators=('zptvalidator', ), widget=atapi.TextAreaWidget( label=_(u'label_body_zpt', default=u'Newsletter Template'), description=_( 'help_body_zpt', default=u'This is a Zope Page Template file that is used for \ rendering the newsletter mail.'), i18n_domain="plone", rows=30, ), ), atapi.TextField( 'description', accessor="Description", widget=atapi.TextAreaWidget( label=_(u"label_description", default=u'Description'), description=_(u"help_description", default=u"Enter a value for description."), i18n_domain="plone", ), ),
size=10, ) ), # XXX can be removed in version 4 ZPTField( 'out_template_pt', schemata='settings', required=False, validators=('zptvalidator', ), widget=atapi.TextAreaWidget( label=_( u"label_out_template_pt", default=u"Outgoing Mail Template, NOT USED ANY MORE!"), description=_( u"help_mailtemplate_body_pt", default=u"This is not used anymore and will be removed in \ future, please see docs for output templates."), i18n_domain="EasyNewsletter", rows=40, ), ), atapi.StringField( 'outputTemplate', vocabulary="get_output_templates", required=True, default_method='get_default_output_template', widget=atapi.SelectionWidget( label=_( u"enl_label_output_template",
# -*- Message Factory Imported Here -*- from collective.TemplateUploadCenter.interfaces import ITemplateUploadCenter from collective.TemplateUploadCenter.config import PROJECTNAME TemplateUploadCenterSchema = folder.ATFolderSchema.copy() + atapi.Schema(( # -*- Your Archetypes field definitions here ... -*- atapi.TextField( name='description', accessor='Description', #storage=MetadataStorage(), widget=atapi.TextAreaWidget( label=u'Description', label_msgid='description', description=u'Description for the Template Upload Center.', i18n_domain='collective.TemplateUploadCenter', rows=6, ), searchable=True, ), atapi.StringField( 'product_title', default='Templates', widget=atapi.StringWidget( label=u'Product Title', label_msgid='product_title', description= u"Title of products when using the project view. For example, 'Add-on Product', 'Extension', or 'Template'.", i18n_domain='collective.TemplateUploadCenter', ),
'vocab_method': 'getComplexidades', 'control_param': 'id', }, { 'name': 'valor_deflator', 'action': 'value', 'vocab_method': 'getVlDeflator', 'control_param': 'id', }, ), )), atapi.StringField( name="produto", required=False, searchable=False, widget=atapi.TextAreaWidget(label=_(u"Produto"), ), ), atapi.StringField(name='complexidade', required=True, searchable=True, vocabulary=[], widget=MasterSelectWidget( label=_(u"Complexidade"), description=_(u"Complexidade"), )), atapi.FloatField(name='multiplicador', required=True, searchable=True, default=1.0, widget=atapi.StringWidget( label=_(u"Multiplicador"),
class LaTeXCodeInjectionExtender(object): adapts(ILaTeXCodeInjectionEnabled) implements(IOrderableSchemaExtender) _fields = [] add_field(LaTeXCodeField( name='preLatexCode', schemata='LaTeX', default_content_type='text/plain', allowable_content_types='text/plain', write_permission=ModifyLaTeXInjection, widget=atapi.TextAreaWidget( label=_(u'pre_latex_code_label', default=u'LaTeX code above content'), description=_(u'pre_latex_code_help', default=u'')))) add_field(LaTeXCodeField( name='postLatexCode', schemata='LaTeX', default_content_type='text/plain', allowable_content_types='text/plain', write_permission=ModifyLaTeXInjection, widget=atapi.TextAreaWidget( label=_(u'post_latex_code_label', default=u'LaTeX code beneath content'), description=_(u'post_latex_code_help', default=u'')))) add_field(ExtensionStringField( name='preferredColumnLayout', schemata='LaTeX', default=NO_PREFERRED_LAYOUT, write_permission=ModifyLaTeXInjection, vocabulary=((NO_PREFERRED_LAYOUT, _('injection_label_no_preferred_column_layout', default='No preferred column layout')), (ONECOLUMN_LAYOUT, _('injection_label_one_column_layout', default='One column layout')), (TWOCOLUMN_LAYOUT, _('injection_label_two_column_layout', default='Two column layout'))), widget=atapi.SelectionWidget( label=_(u'injection_label_preferred_column_layout', default=u'Preferred layout'), description=_( u'injection_help_preferred_column_layout', default=u'When choosing a one or two column layout, the ' u'layout will switched for this content and all ' u'subsequent contents in the PDF, if necessary. ' u'If "no preferred layout" is selected the currently ' u'active layout is kept.')))) add_field( interfaces=[IChapter, ISimpleLayoutBlock], field=ExtensionBooleanField( name='latexLandscape', schemata='LaTeX', default=False, write_permission=ModifyLaTeXInjection, widget=atapi.BooleanWidget( label=_(u'injection_label_landscape', default=u'Use landscape')))) add_field( interfaces=[IChapter, ISimpleLayoutBlock], field=ExtensionBooleanField( name='preLatexClearpage', schemata='LaTeX', default=False, write_permission=ModifyLaTeXInjection, widget=atapi.BooleanWidget( label=_(u'injection_label_insert_clearpage_before_content', default=u'Insert page break before this content')))) add_field( interfaces=[IChapter, ISimpleLayoutBlock], field=ExtensionBooleanField( name='postLatexClearpage', schemata='LaTeX', default=False, write_permission=ModifyLaTeXInjection, widget=atapi.BooleanWidget( label=_(u'injection_label_insert_clearpage_after_content', default=u'Insert page break after this content')))) add_field( interfaces=[IChapter, ISimpleLayoutBlock], field=ExtensionBooleanField( name='preLatexNewpage', schemata='LaTeX', default=False, write_permission=ModifyLaTeXInjection, widget=atapi.BooleanWidget( label=_(u'injection_label_insert_newpage_before_content', default=u'Insert column break before this content'), description=_(u'This option inserts a column break when ' u'two column layout is active.')))) add_field( # hideFromTOC is only useful when we have a showTitle checkbox too condition=hide_from_toc_condition, insert_after='showTitle', field=ExtensionBooleanField( name='hideFromTOC', default=False, required=False, widget=atapi.BooleanWidget( label=_(u'injection_label_hide_from_toc', default=u'Hide from table of contents'), description=_(u'injection_help_hide_from_toc', default=u'Hides the title from the table of ' u'contents and does not number the heading.')))) def __init__(self, context): self.context = context def getFields(self): if not self._context_is_within_book(): return [] fields = [] for item in self._fields: condition = item.get('condition') if condition and not condition(self.context): continue interfaces = item.get('interfaces') if interfaces: provided = [iface for iface in interfaces if iface.providedBy(self.context)] if len(provided) == 0: continue fields.append(item.get('field')) return fields def getOrder(self, schematas): for item in self._fields: insert_after = item.get('insert_after') if not insert_after: continue field = item.get('field') if field.schemata not in schematas: continue schemata = schematas[field.schemata] if insert_after not in schemata or field.__name__ not in schemata: continue schemata.remove(field.__name__) schemata.insert(schemata.index(insert_after) + 1, field.__name__) return schematas def _context_is_within_book(self): # In some cases REQUEST is no available. if not hasattr(self.context, 'REQUEST'): return False if IWithinBookLayer.providedBy(self.context.REQUEST): return True return False
name='responsavel', required=False, widget=atapi.StringWidget( label=_(u"Responsavel"), description=_(u"") ), ), atapi.TextField( name='mensagem', required=False, searchable=True, storage=atapi.AnnotationStorage(migrate=True), widget=atapi.TextAreaWidget( label=_(u"Mensagem"), description=_(u""), rows=5, ), ), )) schemata.finalizeATCTSchema(MensagemSchema) class Mensagem(ATCTContent): """ Classe do conteudo Mensagem """ implements(IMensagem)
i18n_domain='EasyNewsletter', size=10, )), ZPTField( 'out_template_pt', schemata='settings', required=True, default=config.DEFAULT_OUT_TEMPLATE_PT, validators=('zptvalidator', ), widget=atapi.TextAreaWidget( label=_(u"label_out_template_pt", default=u"Outgoing Mail Template"), description=_( u"help_mailtemplate_body_pt", default= u"This is a Zope Page Template used for rendering of the out going mail. \ You don\'t need to modify it, but if you know TAL (Zope\'s Template \ Attribute Language) you have the full power to customize your outgoing mails." ), i18n_domain="EasyNewsletter", rows=40, ), ), atapi.StringField( 'subscriber_confirmation_mail_subject', schemata="settings", required=True, default=config.DEFAULT_SUBSCRIBER_CONFIRMATION_MAIL_SUBJECT, widget=atapi.StringWidget( label=_( u'EasyNewsletter_label_subscriber_confirmation_mail_subject',
from eea.relations.widget.referencewidget import EEAReferenceBrowserWidget SCHEMA = atapi.Schema(( atapi.TextField( schemata='default', name='story_titles', languageIndependent=False, searchable=True, required_for_published=False, required=True, allowable_content_types=('text/plain',), default_content_type='text/plain', default_output_type='text/plain', widget=atapi.TextAreaWidget( label='Story titles', description=('Story titles, one per line.'), label_msgid='EEAContentTypes_label_embed', i18n_domain='eea',), ), atapi.TextField( schemata='default', name='full_story_description', languageIndependent=False, searchable=True, required_for_published=False, required=False, allowable_content_types=('text/html',), default_content_type='text/html', default_output_type='text/x-html-safe', widget=atapi.RichWidget( label='Full story description',
size=50, label='Backward label', label_msgid='widget_backward_label_title', description='Label to be used for backward relations', description_msgid='widget_forward_label_description', i18n_domain="eea" ) ), atapi.TextField('description', schemata='default', searchable=1, accessor="Description", widget=atapi.TextAreaWidget( label='Description', description="A short summary of the content", label_msgid="label_description", description_msgid="help_description", i18n_domain="plone" ) ), atapi.BooleanField('required', schemata='default', default=False, widget=atapi.BooleanWidget( label='Required', label_msgid='widget_required_title', description=('Select this if you want to make this relation ' 'mandatory (action: edit)'), description_msgid='widget_required_description', i18n_domain="eea" )
from Products.Archetypes import atapi from Products.Archetypes.TemplateMixin import TemplateMixin from Products.Archetypes.Marshall import PrimaryFieldMarshaller from Products.Archetypes.config import PKG_NAME schema = atapi.BaseSchema + atapi.Schema(( atapi.TextField('teaser', searchable=1, widget=atapi.TextAreaWidget(description="""A short lead-in to the article so that we might get people to read the body""", label="Teaser", rows=3)), # Using a bare ObjetField doesn't make sense ... #ObjectField('author'), atapi.StringField('author'), atapi.TextField('body', required=1, primary=1, searchable=1, default_output_type='text/html', allowable_content_types=('text/restructured', 'text/plain', 'text/html', 'application/msword'), widget=atapi.RichWidget(), ), atapi.IntegerField("number", index="FieldIndex",
widget=atapi.InAndOutWidget( label="Órgão", description="Selecione o órgão.", ), enforceVocabulary=True, vocabulary=NamedVocabulary("""Orgao"""), required=True, searchable=True, ), atapi.TextField( 'local', storage=atapi.AnnotationStorage(), widget=atapi.TextAreaWidget( label="Local", description="Informe o local do evento", ), allowable_content_types="('text/html')", default_output_type="text/html", searchable=1, ), atapi.TextField( 'contatos', storage=atapi.AnnotationStorage(), widget=atapi.TextAreaWidget( label="Contatos", ), allowable_content_types="('text/html')", default_output_type="text/html", searchable=1,