コード例 #1
0
    def __init__(self, oid, **kwargs):
        BaseFormField.__init__(self, oid, **kwargs)

        self.fgField = atapi.StringField('fg_product_price_field',
            searchable=False,
            required=False,
            write_permission=View,
            )
コード例 #2
0
ファイル: test_purge.py プロジェクト: urska19/Plone_site
 class ATMultipleFields(atapi.BaseContent):
     schema = atapi.Schema((
             atapi.StringField('foo'),
             atapi.FileField('file1'),
             atapi.ImageField('image1'),
             atapi.ImageField('image2', sizes={'mini': (50,50), 'normal' : (100,100)}),
             atapi.TextField('text'),
         ))
コード例 #3
0
    def __init__(self, oid, **kwargs):
        BaseFormField.__init__(self, oid, **kwargs)

        self.fgField = atapi.StringField('fg_product_select_field',
            searchable=False,
            required=False,
            widget=atapi.SelectionWidget(),
            vocabulary='_get_selection_vocabulary',
            enforceVocabulary=False,
            write_permission=View,
            )
コード例 #4
0
from gcommons.Users import UsersMessageFactory as _
from gcommons.Users.interfaces import IgcPerson
from gcommons.Users.interfaces import IgcPersonModifiedEvent
from gcommons.Users.config import PROJECTNAME
from gcommons.Users.config import PASSWORD_KEY

logger = logging.getLogger('gcommons.Users.content.gcPerson')

gcPersonSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema((
    #
    # Schemata: Basic Information
    #
    atapi.StringField(name='firstName',
                      widget=atapi.StringWidget(
                          label=_(u"First Name"),
                          i18n_domain='gcommons.Users',
                      ),
                      required=True,
                      schemata="Basic Information",
                      searchable=True),
    atapi.StringField(name='middleName',
                      widget=atapi.StringWidget(
                          label=_(u"Middle Name"),
                          i18n_domain='gcommons.Users',
                      ),
                      required=False,
                      schemata="Basic Information",
                      searchable=True),
    atapi.StringField(name='lastName',
                      widget=atapi.StringWidget(
                          label=_(u"Last Name"),
                          i18n_domain='gcommons.Users',
コード例 #5
0
ファイル: comment.py プロジェクト: marchon/Journal-Commons
from gcommons.Core import CoreMessageFactory as _
from gcommons.Core.interfaces import IComment
from gcommons.Core.config import PROJECTNAME

CommentSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema((
    atapi.ComputedField('title',
                        searchable=1,
                        expression='context._compute_title()',
                        accessor='Title'),
    atapi.StringField(
        'commentType',
        widget=atapi.SelectionWidget(
            label="Type",
            description=
            "Describe correctly the type of comment. Different types will be visible for different users.",
            label_msgid="gcommons_comment_type",
            description_msgid="gcommons_help_comment_type",
        ),
        required=True,
        vocabulary="getCommentTypesVocabulary",
        searchable=True),
    atapi.ReferenceField('refDraft',
                         relationship='refDraft',
                         multiValued=False,
                         default_method='getDefaultRefDraft',
                         widget=ReferenceBrowserWidget(visible={
                             'edit': 'invisible',
                             'view': 'visible'
                         })),
    atapi.TextField(
        'text',
コード例 #6
0
ファイル: client.py プロジェクト: udithap/Bika-LIMS
from bika.lims import PMF, bikaMessageFactory as _
from bika.lims import interfaces
from bika.lims.config import *
from bika.lims.content.organisation import Organisation
from bika.lims.interfaces import IClient
from bika.lims.utils import isActive
from zope.component import getUtility
from zope.interface import implements
from zope.interface.declarations import alsoProvides
import json
import sys

schema = Organisation.schema.copy() + atapi.Schema((
    atapi.StringField(
        'ClientID',
        searchable=True,
        widget=atapi.StringWidget(label=_("Client ID"), ),
    ),
    atapi.BooleanField(
        'MemberDiscountApplies',
        default=False,
        write_permission=ManageClients,
        widget=atapi.BooleanWidget(label=_("Member discount applies"), ),
    ),
    atapi.StringField(
        'ClientType',
        required=1,
        default='noncorporate',
        write_permission=ManageClients,
        vocabulary=CLIENT_TYPES,
        widget=atapi.SelectionWidget(label=_("Client Type"), ),
コード例 #7
0
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",
コード例 #8
0
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',
コード例 #9
0
from Products.ATContentTypes.content import base
from Products.ATContentTypes.content.schemata import ATContentTypeSchema
from Products.ATContentTypes.content.schemata import finalizeATCTSchema

from Products.CMFCore.permissions import View
from Products.CMFCore.permissions import ModifyPortalContent
from AccessControl import ClassSecurityInfo

from iservices.rssdocument import RSSDocumentMessageFactory as _
from iservices.rssdocument.interfaces import IRSSDocument
from iservices.rssdocument import config

RSSDocumentSchema = ATContentTypeSchema.copy() + atapi.Schema((
    atapi.StringField(
        'RSSLink',
        required=True,
        widget=atapi.StringWidget(label=_(u'RSS URL'),
                                  description=_(u'The URL of the RSS Feed')),
    ),
    atapi.IntegerField(
        'max_entries',
        required=True,
        widget=atapi.IntegerWidget(
            label=_(u'Max Entries'),
            description=_(u'Maximum Number of entries to show')),
    ),
))
finalizeATCTSchema(RSSDocumentSchema)


class RSSDocument(base.ATCTContent):
    """A Plone document that embedds a RSS feed with JQuery"""
コード例 #10
0
from msgraph.sharepoint import (Sharepoint,
                                SharepointDateTimeColumn,
                                SharepointChoiceColumn,)
from msgraph.drives import Drive

from collective.pfgsharepoint import _, PROJECTNAME
from collective.pfgsharepoint.utils import getClient

logger = logging.getLogger('collective.pfgsharepoint')

SharePointAdapterSchema = FormAdapterSchema.copy() + atapi.Schema((
    atapi.StringField('sharepoint_tenant',
                      required=True,
                      write_permission=ModifyPortalContent,
                      read_permission=ModifyPortalContent,
                      vocabulary_factory="collective.pfgsharepoint.vocabularies.SharepointTenants",
                      widget=atapi.SelectionWidget(
                          label=u'SharePoint Tenant',
                      )),
    atapi.StringField('sharepoint_site',
                      required=False,
                      write_permission=ModifyPortalContent,
                      read_permission=ModifyPortalContent,
                      vocabulary='getSites',
                      widget=atapi.SelectionWidget(
                          label=u'SharePoint Site ID',
                      )),
    atapi.StringField('sharepoint_list',
                      required=False,
                      write_permission=ModifyPortalContent,
                      read_permission=ModifyPortalContent,
コード例 #11
0
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",
        ),
    ),
    atapi.StringField(
        name="mapstyle",
        widget=atapi.StringWidget(
            label=u"Map Style",
            description=u"Add some inline-styles",
コード例 #12
0
# Schema definition
schema = ATCTContent.schema.copy() + atapi.Schema(
    (
        atapi.StringField(
            name='tipo_servico',
            required=True,
            searchable=True,
            #vocabulary=DisplayList(
            #    (('', ''),
            #        ('1', 'Infraestrutura'),
            #        ('2', 'Apoio ao Controle'),
            #        ('3', 'Sustentação'),
            #        ('4', 'Apoio ao Planejamento'),)),
            vocabulary=DisplayList((
                ('', ''),
                ('2', 'Apoio ao Controle'),
                ('3', 'Sustentação'),
                ('4', 'Apoio ao Planejamento'),
            )),
            widget=MasterSelectWidget(
                label=_(u"Tipo de Serviço"),
                description=_(u"Tipo de Serviço"),
                slave_fields=({
                    'name': 'atividade',
                    'action': 'vocabulary',
                    'vocab_method': 'getAtividades',
                    'control_param': 'id',
                }, ),
            )),
        atapi.StringField(name='atividade',
                          required=True,
                          searchable=True,
コード例 #13
0
# -*- Message Factory Imported Here -*-
from mj.agenda import agendaMessageFactory as _

from mj.agenda.interfaces.interfaces import IMJEvento
from mj.agenda.config import PROJECTNAME


MJEventoSchema = ATFolder.schema.copy() + ATEventSchema.copy() + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-
    atapi.StringField(
        name='event_categoria',
        required=False,
        searchable=True,
        schemata='categorization',
        widget=atapi.SelectionWidget(
            label=_(u"Categoria do evento"),
            description=_(u"Selecione a categoria do evento"),
            format='select',),
        vocabulary='getCategoria',
    ),

))


schemata.finalizeATCTSchema(MJEventoSchema, moveDiscussion=False)


class MJEvento(ATFolder, CalendarSupportMixin):
    """
    """
コード例 #14
0
from zope.interface import implements

from Products.Archetypes import atapi
from Products.ATContentTypes.content import folder
from Products.ATContentTypes.content import schemata

from slc.tasks import tasksMessageFactory as _
from slc.tasks.interfaces import ITaskRequest
from slc.tasks.config import PROJECTNAME

TaskRequestSchema = folder.ATFolderSchema.copy() + atapi.Schema((
    atapi.StringField(
        'agencyContact',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(
            label=_(u"Agency contact person"),
            description=
            _(u"The contact details of people within the agency who can be contacted regarding this task."
              ),
        ),
    ),
    atapi.StringField('priority',
                      storage=atapi.AnnotationStorage(),
                      widget=atapi.SelectionWidget(
                          label=_(u"Priority"),
                          description=_(u"The priority of this task."),
                          format="select",
                      ),
                      default=_(u"Medium"),
                      vocabulary=["High", "Medium", "Low"]),
    atapi.DateTimeField(
        'dueDate',
コード例 #15
0
from AccessControl import ClassSecurityInfo
from Products.ATContentTypes.content import schemata
from Products.Archetypes import atapi
from Products.CMFCore.permissions import View
from Products.PloneFormGen.content.fieldsBase import BaseFormField, BaseFieldSchemaStringDefault
from jazkarta.shop.interfaces import IProduct
from .interfaces import IJazShopSelectStringField, IJazShopMultiSelectStringField
from .interfaces import IJazShopArbitraryPriceStringField
from .config import PROJECTNAME


JazShopSelectFieldSchema = BaseFieldSchemaStringDefault.copy() + atapi.Schema((
    atapi.StringField('availableProducts',
        searchable=False,
        required=False,
        widget=atapi.MultiSelectionWidget(),
        vocabulary_factory='jazkarta.pfg.jazshop.available_products',
        enforceVocabulary=False,
    ),
    atapi.StringField('selectionFormat',
        vocabulary=('select', 'radio'),
        enforceVocabulary=True,
        widget=atapi.SelectionWidget(format='radio'),
        required=True,
    ),
))

schemata.finalizeATCTSchema(JazShopSelectFieldSchema, moveDiscussion=False)


def get_available_products_vocab(context):
コード例 #16
0
            label=u'Faculty Titles',
            label_msgid='isaw.facultycv_label_Titles',
            il8n_domain='isaw.facultycv',
            ),

        required = False,
        searchable = True
    ),

    atapi.StringField(
        name = 'Phone',
        default_output_type='text/x-html-safe',
        widget = atapi.StringWidget(
            label=u'Phone',
            label_msgid='isaw.facultycv_label_Phone',
            il8n_domain='isaw.facultycv',
            ),

        required = False,
        searchable = True

    ),

    atapi.StringField(
        name = 'Email',
        default_output_type='text/x-html-safe',
        widget = atapi.StringWidget(
            label=u'Email',
            label_msgid='isaw.facultycv_label_Email',
            il8n_domain='isaw.facultycv',
            ),
コード例 #17
0
from Products.ATContentTypes.content import base
from Products.ATContentTypes.content import schemata

from collective.contacts import contactsMessageFactory as _
from collective.contacts.interfaces import IOrganization
from collective.contacts.config import PROJECTNAME
from collective.contacts.content import DeprecatedATFieldProperty

OrganizationSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-
    atapi.StringField(
        'address',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(
            label=_(u"Address"),
            description=_(u"Organization's address"),
        ),
        required=False,
        searchable=1,
    ),
    atapi.StringField(
        'country',
        storage=atapi.AnnotationStorage(),
        widget=atapi.SelectionWidget(
            label=_(u"Country"),
            description=_(u"Organization's country"),
        ),
        vocabulary_factory='contacts.countries',
        required=False,
        searchable=1,
    ),
コード例 #18
0
                DateTime('%d/12/31' % date.year()).latestTime())
    return ()


periodVocabulary = atapi.DisplayList((
    ('today', _(u'Today')),
    ('this_month', _(u'This month')),
    ('this_year', _(u'This year')),
))

PeriodCriteriaSchema = ATBaseCriterionSchema + atapi.Schema((atapi.StringField(
    'period',
    required=1,
    write_permission=ChangeTopics,
    default='today',
    vocabulary=periodVocabulary,
    widget=atapi.SelectionWidget(
        label=_(u'label_date_criteria_value', default=u'Which period'),
        description=_(
            u'help_date_criteria_value',
            default=u'Select the period inside which the date must be.')),
), ))


class ATPeriodCriteria(ATBaseCriterion):
    """A relative date criterion"""

    implements(IATPeriodCriteria)

    security = ClassSecurityInfo()
    schema = PeriodCriteriaSchema
    meta_type = 'ATPeriodCriteria'
コード例 #19
0
from bika.lims.config import *
from bika.lims.content.organisation import Organisation
from bika.lims.interfaces import IClient
from bika.lims.utils import isActive
from zope.component import getUtility
from zope.interface import implements
from zope.interface.declarations import alsoProvides
import json
import sys
from bika.lims.workflow import getCurrentState, StateFlow, InactiveState

schema = Organisation.schema.copy() + atapi.Schema((
    atapi.StringField(
        'ClientID',
        required=1,
        searchable=True,
        validators=('uniquefieldvalidator', 'standard_id_validator'),
        widget=atapi.StringWidget(label=_("Client ID"), ),
    ),
    atapi.BooleanField(
        'BulkDiscount',
        default=False,
        write_permission=ManageClients,
        widget=atapi.BooleanWidget(label=_("Bulk discount applies"), ),
    ),
    atapi.BooleanField(
        'MemberDiscountApplies',
        default=False,
        write_permission=ManageClients,
        widget=atapi.BooleanWidget(label=_("Member discount applies"), ),
    ),
コード例 #20
0
from rg.prenotazioni.interfaces import IPrenotazione, IPrenotazioniFolder
from zope.interface import implements

OVERBOOKED_MESSAGE = _(
    'overbook_message',
    default=u"Siamo spiacenti, è già stato preso un appuntamento "
    u"nella stessa fascia oraria, premere il pulsante "
    u"ANNULLA per effettuare una nuova richiesta di "
    u"prenotazione")

PrenotazioneSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema((
    atapi.StringField(
        'tipologia_prenotazione',
        storage=atapi.AnnotationStorage(),
        vocabulary='getElencoTipologie',
        widget=atapi.SelectionWidget(
            label=_(u"Tipologia della prenotazione"),
            condition='object/getElencoTipologie',
        ),
        required=False,
    ),
    atapi.DateTimeField(
        'data_prenotazione',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(
            label=_(u'Data prenotazione'),
            visible={
                'edit': 'hidden',
                'view': 'visible'
            },
        ),
        required=True,
コード例 #21
0
# This file is part of Bika LIMS
#
# Copyright 2011-2017 by it's authors.
# Some rights reserved. See LICENSE.txt, AUTHORS.txt.

from zope.interface import implements
from Products.Archetypes import atapi
from Products.Archetypes.public import BaseContent
from bika.lims.interfaces import IMultifile
from bika.lims.content.bikaschema import BikaSchema
from bika.lims import bikaMessageFactory as _
from bika.lims import config

schema = BikaSchema.copy() + atapi.Schema((
    atapi.StringField('DocumentID',
                      required=1,
                      validators=('uniquefieldvalidator', ),
                      widget=atapi.StringWidget(label=_("Document ID"), )),
    atapi.FileField('File',
                    required=1,
                    widget=atapi.FileWidget(
                        label=_("Document"),
                        description=_("File upload "),
                    )),
    atapi.StringField('DocumentVersion',
                      widget=atapi.StringWidget(
                          label=_("Document Version"), )),
    atapi.StringField(
        'DocumentLocation',
        widget=atapi.StringWidget(
            label=_("Document Location"),
            description=_("Location where the document set is shelved"),
コード例 #22
0
 class ATNoFields(atapi.BaseContent):
     schema = atapi.Schema((atapi.StringField('foo'), ))
コード例 #23
0
            label=_(u"Model Start Time"),
            description=_(u"Logs when the model begins execution."),
            visible={
                'view': 'hidden',
                'edit': 'hidden'
            },
        ),
        validators=('isValidDate'),
    ),
    atapi.StringField(
        'runstatus',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(
            label=_(u"Model Run Status"),
            description=_(u"Maintain the state of the job."),
            visible={
                'view': 'hidden',
                'edit': 'hidden'
            },
        ),
        required=True,
        default=_(u"queued"),
    ),
))

# Set storage on fields copied from ATContentTypeSchema, making sure
# they work well with the python bridge properties.

SCALDSSchema['title'].storage = atapi.AnnotationStorage()
SCALDSSchema['description'].storage = atapi.AnnotationStorage()

schemata.finalizeATCTSchema(SCALDSSchema, moveDiscussion=False)
コード例 #24
0
from eke.biomarker.interfaces import IBiomarkerFolder
from eke.biomarker.utils import setFacetedNavigation
from eke.knowledge.content import knowledgefolder
from Products.Archetypes import atapi
from Products.ATContentTypes.content.schemata import finalizeATCTSchema
from Products.CMFCore.utils import getToolByName
from zope.interface import implements

BiomarkerFolderSchema = knowledgefolder.KnowledgeFolderSchema.copy(
) + atapi.Schema((
    atapi.StringField(
        'bmoDataSource',
        required=False,
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(
            label=_(u'Biomarker-Organ RDF Data Source'),
            description=
            _(u'URL to a source of RDF data that supplements the RDF data source with biomarker-organ data.'
              ),
            size=60,
        ),
    ),
    atapi.StringField(
        'bmuDataSource',
        required=False,
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(
            label=_(u'Biomarker-BioMuta RDF Data Source'),
            description=
            _(u'URL to a source of RDF data that supplements the RDF data source with biomarker-BioMuta data.'
              ),
            size=60,
コード例 #25
0
""" Book """

from Products.Archetypes import atapi
from Products.ATContentTypes.content.document import ATDocument

SCHEMA = ATDocument.schema.copy() + atapi.Schema((
    atapi.StringField('isbn',
                      schemata='book',
                      widget=atapi.StringWidget(label=u'ISBN',
                                                description=u'ISBN')),
    atapi.StringField('link',
                      schemata='book',
                      widget=atapi.StringWidget(label=u'Link',
                                                description=u'Book details')),
    atapi.StringField('publisher',
                      schemata='book',
                      widget=atapi.StringWidget(
                          label=u'Publisher', description=u'Book publisher')),
    atapi.IntegerField('rating',
                       schemata='book',
                       widget=atapi.IntegerWidget(label=u'Rating',
                                                  description=u'Book rating')),
))


class Book(ATDocument):
    """ Demo Book
    """
    archetypes_name = meta_type = portal_type = 'Book'
    _at_rename_after_creation = True
    schema = SCHEMA
コード例 #26
0
from zope import event
from zope.interface import implements
from Products.Archetypes import atapi
from Products.ATContentTypes.content.folder import ATFolder
from eea.relations.events import ObjectInitializedEvent
from Products.TALESField import TALESString

from eea.relations.content.interfaces import IContentType

EditSchema = ATFolder.schema.copy() + atapi.Schema((
    atapi.StringField(
        'ct_type',
        schemata="default",
        vocabulary_factory='eea.relations.voc.PortalTypesVocabulary',
        validators=('eea.relations.contenttype', ),
        widget=atapi.SelectionWidget(
            label='Portal type',
            label_msgid='widget_portal_type_title',
            description='Select portal type',
            description_msgid='widget_portal_type_description',
            i18n_domain="eea")),
    atapi.StringField('ct_interface',
                      schemata="default",
                      vocabulary_factory='eea.relations.voc.ObjectProvides',
                      validators=('eea.relations.contenttype', ),
                      widget=atapi.SelectionWidget(
                          label='Interface',
                          label_msgid='widget_interface_title',
                          description='Select interface',
                          description_msgid='widget_interface_description',
                          i18n_domain="eea")),
コード例 #27
0
from Products.ATContentTypes.content import base
from Products.ATContentTypes.content import schemata

from uwosh.itdocs import itdocsMessageFactory as _
from uwosh.itdocs.interfaces import IComponentInstruction
from uwosh.itdocs.config import PROJECTNAME

from Products.ATContentTypes.configuration import zconf

ComponentInstructionSchema = schemata.ATContentTypeSchema.copy(
) + atapi.Schema((
    atapi.StringField(
        'Project',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(
            label=_(u"Component"),
            description=_(u"Component name or label"),
        ),
        default=_(''),
    ),
    atapi.TextField(
        'questions',
        storage=atapi.AnnotationStorage(),
        widget=atapi.RichWidget(
            label=_(u"Function"),
            description=_(u"Describe the function of the component"),
            rows=10,
        ),
        default='',
    ),
コード例 #28
0
ファイル: sponsored.py プロジェクト: jessesnyder/isaw.web
from isaw.events.content import general
from isaw.events.interfaces import ISponsored
from isaw.events.config import PROJECTNAME

SponsoredSchema = general.GeneralSchema.copy() + atapi.Schema((

    ###################
    # SPONSOR
    ###################
    atapi.StringField(
    schemata='sponsor',
    name='event_Sponsor_Name',
    widget=atapi.StringWidget(
        label=u'Event Sponsor Name',
        label_msgid='ISAW_Event_Sponsor_Name',
        il8n_domain='ISAW_Event',
        maxlength=255,
        size=50,
        ),
        
    required=False,
    searchable=True),
    
    atapi.StringField(
    schemata='sponsor',
    name='event_Sponsor_Url',
    validators = ('isURL'),
    widget=atapi.StringWidget(
        label=u'Event Sponsor Url',
        label_msgid='ISAW_Event_Sponsor_Url',
        il8n_domain='ISAW_Event',
コード例 #29
0
# Event support
from DateTime import DateTime
from Products.ATContentTypes.utils import DT2dt
from Products.ATContentTypes.lib.calendarsupport import CalendarSupportMixin
from Products.ATContentTypes.interfaces import ICalendarSupport



EditorsMeetingSchema = folder.ATFolderSchema.copy() + atapi.Schema((
    # -*- Your Archetypes field definitions here ... -*-
    atapi.StringField(
        name='venue',
        required=False,
        searchable=1,
        #default='',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(
            label=_(u"Venue"),
            description=_(u"Description of the venue(s)"),
        ),
    ),

    #
    # Dates
    atapi.DateTimeField(
        name='startDate',                  
        required=True,                  
        searchable=False,                  
        accessor='start',                  
#TODO                  write_permission = ChangeEvents,                  
        default_method=DateTime,                  
コード例 #30
0
import csv
from StringIO import StringIO
from DateTime import DateTime

SignupSheetSchema = folder.ATFolderSchema.copy() + atapi.Schema((
    atapi.BooleanField(
        'allowSignupForMultipleSlots',
        storage=atapi.AnnotationStorage(),
        widget=atapi.BooleanWidget(
            label=_(u'Allow Signup For Multiple Slots'),
            description=_(
                u'Allow the user to signup for more than one slot.'))),
    atapi.StringField(
        'showSlotNames',
        storage=atapi.AnnotationStorage(),
        widget=atapi.BooleanWidget(
            label=_(u'Show Individual Time Slot Names'),
            description=_(u'Whether or not to show individual slot names.'))),
    atapi.LinesField(
        'extraFields',
        storage=atapi.AnnotationStorage(),
        vocabulary="getExtraFieldsVocabulary",
        widget=atapi.MultiSelectionWidget(
            label=_(u'Extra Fields'),
            description=_(u'Information you want to collect from users besides'
                          ' just name and email.'),
            format='checkbox')),
    atapi.LinesField(
        'contactInfo',
        storage=atapi.AnnotationStorage(),
        widget=atapi.LinesWidget(