示例#1
0
from ebc.pauta.config import PROJECTNAME

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


    atapi.StringField(
        name='entrevistado',
        widget=atapi.StringWidget(
            label='Entrevistado',
        ),
    ),

    atapi.DateTimeField(
       name='data',
       default_method=DateTime,       
       widget=atapi.CalendarWidget(
           label="Data e Hora",
       ),
    ),

    atapi.LinesField(
        name='reporter',
        widget=atapi.InAndOutWidget(
            label="Repórter",
        ),
        vocabulary='getListaReporteres',
    ),

    atapi.LinesField(
        name='cinegrafista',
        widget=atapi.InAndOutWidget(
示例#2
0
    ),
    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',
        storage=atapi.AnnotationStorage(),
        widget=atapi.CalendarWidget(
            label=_(u"Due Date"),
            show_hm=False,
            show_ymd=True,
            starting_year=datetime.now().year,
            description=_(u"The date that this task must completed"),
        ),
    ),
))

TaskRequestSchema['title'].storage = atapi.AnnotationStorage()
TaskRequestSchema['description'].storage = atapi.AnnotationStorage()
TaskRequestSchema['description'].widget.label = 'Instructions'

schemata.finalizeATCTSchema(TaskRequestSchema,
                            folderish=True,
                            moveDiscussion=False)
示例#3
0
         description=
         _(u"A vector map providing costs associated with households/employees by area."
           ),
         startup_directory='/luc/impacts/scalds/water',
     ),
     relationship='scalds_water',
     allowed_types=('SimMap'),
     multiValued=False,
 ),
 atapi.DateTimeField(
     'end_time',
     storage=atapi.AnnotationStorage(),
     widget=atapi.CalendarWidget(
         label=_(u"Model End Time"),
         description=_(u"Logs when model ends execution."),
         visible={
             'view': 'hidden',
             'edit': 'hidden'
         },
     ),
     validators=('isValidDate'),
 ),
 atapi.DateTimeField(
     'start_time',
     storage=atapi.AnnotationStorage(),
     widget=atapi.CalendarWidget(
         label=_(u"Model Start Time"),
         description=_(u"Logs when the model begins execution."),
         visible={
             'view': 'hidden',
             'edit': 'hidden'
示例#4
0
     allowed_types=('Milestone'),
     relationship='task_milestone',
 ),
 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',
     storage=atapi.AnnotationStorage(),
     widget=atapi.CalendarWidget(
         label=_(u"Due Date"),
         description=_(u"The date that this task must completed"),
     ),
 ),
 atapi.DateTimeField(
     'startDate',
     storage=atapi.AnnotationStorage(),
     widget=atapi.CalendarWidget(
         label=_(u"Start Date"),
         description=_(u"The date work on this should task should begin"),
     ),
 ),
 atapi.DateTimeField(
     'completionDate',
     storage=atapi.AnnotationStorage(),
     widget=atapi.CalendarWidget(
示例#5
0
    atapi.TextField(
        name='observacao',
        widget=atapi.TextAreaWidget(
            label="Observação",
        ),
    allowable_content_types="('text/html','text/plain')",
    default_output_type="text/html",
    searchable=1,
    ), 
    
    atapi.DateTimeField(
       name='data',
       widget=atapi.CalendarWidget(
           label="Data",
           show_hm=False,
           format='%d/%m/%Y',
           starting_year='2012',
           ),
        required='true',
        default_method = 'getDefaultTime',
        validators=('isValidDate',),        
    ),

    atapi.LinesField(
        name='produtor',
        widget=atapi.InAndOutWidget(
            label="Produtor",
        ),
        vocabulary='getListaProdutores',
    ),

    atapi.LinesField(
示例#6
0
try:
    from Products.CMFPlone.factory import _IMREALLYPLONE5  # noqa
except ImportError:
    from archetypes.querywidget.field import QueryField
else:
    from plone.app.collection.field import QueryField

PROJECTNAME = "plone.restapi.tests"

ATTestDocumentSchema = ATDocumentSchema.copy() + atapi.Schema((
    atapi.StringField("testStringField"),
    atapi.BooleanField("testBooleanField"),
    atapi.IntegerField("testIntegerField"),
    atapi.FloatField("testFloatField"),
    atapi.FixedPointField("testFixedPointField"),
    atapi.DateTimeField("testDateTimeField"),
    atapi.LinesField("testLinesField"),
    atapi.FileField("testFileField"),
    atapi.TextField("testTextField"),
    atapi.ImageField("testImageField"),
    atapi.ReferenceField("testReferenceField", relationship="testrelation"),
    atapi.ReferenceField(
        "testMVReferenceField", relationship="testrelation", multiValued=True),
    BlobField("testBlobField"),
    FileField("testBlobFileField"),
    ImageField("testBlobImageField"),
    QueryField("testQueryField"),
    atapi.StringField("testRequiredField", required=True),
    atapi.StringField("testReadonlyField", mode="r"),
    atapi.StringField("testWriteonlyField", mode="w"),
    atapi.StringField("testReadPermissionField",
     storage=atapi.AnnotationStorage(migrate=True),
     validators=('isTidyHtmlWithCleanup', ),
     default_output_type='text/x-html-safe',
     widget=atapi.RichWidget(
         description=("Inserire il testo di presentazione "
                      "dell'agenda corrente"),
         label=_(u'Descrizione Agenda', default=u''),
         rows=10,
         allow_file_upload=zconf.ATDocument.allow_document_upload),
 ),
 atapi.DateTimeField(
     'daData',
     storage=atapi.AnnotationStorage(),
     widget=atapi.CalendarWidget(
         label=_(u'Data inizio validità'),
         description=_(u""),
         show_hm=False,
     ),
     required=True,
     default=DateTime(),
 ),
 atapi.DateTimeField(
     'aData',
     storage=atapi.AnnotationStorage(),
     widget=atapi.CalendarWidget(
         label=_(u'Data fine validità'),
         description=_(
             "aData_help",
             default=u"Leave empty, and this Booking Folder will never expire"
         ),  # noqa
         show_hm=False,
 atapi.StringField(
     'publisher',
     searchable=1,
 ),
 atapi.StringField(
     'publisherURL',
     searchable=1,
 ),
 atapi.StringField(
     'byline',
     searchable=1,
 ),
 atapi.DateTimeField(
     'pubDateOriginal',
     widget=atapi.CalendarWidget(
         label="Publication date",
         description="",
         show_hm=False,
     ),
 ),
 atapi.ReferenceField(
     'program',
     widget=atapi.SelectionWidget(label='Program'),
     allowed_types=('Program'),
     relationship='under program',
     multiValued=0,
     vocabulary_display_path_bound=-1,
 ),
 atapi.StringField(
     'sourceUID',
     schemata='categorization',
 ),
示例#9
0
 atapi.IntegerField(
     "maxTimeResponseTest",
     required=False,
     default=40,
     storage=atapi.AnnotationStorage(),
     widget=atapi.IntegerWidget(
         label=_(u'Exam Time'),
         description=_(
             u'Maximun time in minutes for the user to complete the exam'),
     ),
 ),
 atapi.DateTimeField(
     'initDate',
     required=1,
     searchable=0,
     storage=atapi.AnnotationStorage(),
     widget=atapi.CalendarWidget(
         label=_(u'Start Date'),
         description=_(u"Exam's start date"),
     ),
 ),
 atapi.DateTimeField(
     'finishDate',
     required=1,
     searchable=0,
     storage=atapi.AnnotationStorage(),
     widget=atapi.CalendarWidget(
         label=_(u'End Date'),
         description=_(u"Exam's end date"),
     ),
 ),
 atapi.IntegerField(
示例#10
0
    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,
    ),

    atapi.StringField(
        'mandated_by',
        storage=atapi.AnnotationStorage(),
        widget=atapi.SelectionWidget(
            label=_(u"The above date is"),
            format='radio',
        ),
        vocabulary=['Mandated by an agency outside of the University',
                    'Mandated by UW System policy',
示例#11
0
from zope.interface import implements

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

from uwosh.timeslot import timeslotMessageFactory as _
from uwosh.timeslot.interfaces import ITimeSlot, ICloneable
from uwosh.timeslot.config import PROJECTNAME
from uwosh.timeslot.widget import TimeWidget

TimeSlotSchema = folder.ATFolderSchema.copy() + atapi.Schema((
    atapi.DateTimeField('startTime',
                        storage=atapi.AnnotationStorage(),
                        widget=TimeWidget(label=_('Start Time'))),
    atapi.DateTimeField('endTime',
                        storage=atapi.AnnotationStorage(),
                        widget=TimeWidget(label=_('End Time'))),
    atapi.StringField('name',
                      storage=atapi.AnnotationStorage(),
                      widget=atapi.StringWidget(
                          label=_('Name'), description=_(u'Optional name'))),
    atapi.IntegerField('maxCapacity',
                       storage=atapi.AnnotationStorage(),
                       default=1,
                       required=True,
                       widget=atapi.IntegerWidget(
                           label=_(u'Max Capacity'),
                           description=_(u'The max number of people'))),
    atapi.BooleanField(
        'allowWaitingList',
示例#12
0
        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"""
    implements(ISCOrganism)

    meta_type = "SCOrganism"
    schema = SCOrganismSchema

示例#13
0
    atapi.StringField(
        'obs_importante',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(
            label="Observação importante",
        ),
    ),

    atapi.DateTimeField(
        'data_hora',
        storage=atapi.AnnotationStorage(),
        widget=atapi.CalendarWidget(
            label="Data e hora do evento",
            description="Informe a data e a hora do evento.",
            format='%d/%m/%Y %H:%M',
            starting_year='2013',
        ),
        default_method = 'getDefaultTime',
        validators=('isValidDate'),
        required=True,
    ),

    atapi.StringField(
        'ordem_servico',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(
            label="Ordem de Serviço",
            description="Informe o número da ordem de serviço.",
        ),
        searchable=True,
示例#14
0
              widget=atapi.RichWidget(description="Just a text field for the testing",
                                  label="A Text Field",
                                  )),

    atapi.FileField('afilefield',
              primary=1,
              widget=atapi.RichWidget(description="Just a file field for the testing",
                                  label="A File Field",
                                  )),

    atapi.FileField('anotherfilefield', widget=atapi.FileWidget),

    atapi.LinesField('alinesfield', widget=atapi.LinesWidget),

    atapi.DateTimeField('adatefield',
                  widget=atapi.CalendarWidget(description="A date field",
                                        label="A Date Field")),

    atapi.ObjectField('anobjectfield',
                widget=atapi.StringWidget(description="An object field",
                                    label="An Object Field"),
                validators=('isURL',),
                ),

    atapi.FixedPointField('afixedpointfield',
                    widget=atapi.DecimalWidget(description="A fixed point field",
                                         label="A Fixed Point Field"),
                    ),
    atapi.StringField('awriteonlyfield', mode="w"),

    atapi.StringField('areadonlyfield', mode="r"),
示例#15
0
 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.DateTimeField(
     'startDate',
     storage=atapi.AnnotationStorage(),
     widget=atapi.CalendarWidget(
         label=_(u"Start Date"),
         show_hm=False,
         show_ymd=True,
         starting_year=datetime.now().year,
         description=_(u"The date on which work commenced on this task"),
     ),
 ),
 atapi.DateTimeField(
     'completionDate',
     storage=atapi.AnnotationStorage(),
     widget=atapi.CalendarWidget(
         label=_(u"Completion Date"),
         show_hm=False,
         show_ymd=True,
         starting_year=datetime.now().year,
         description=_(u"The actual date that this task was completed"),
     ),
示例#16
0
    ),
    BackReferenceField(
        'linked_to_resources',
        relationship='linked_resources',
        multiValued=True,
        widget=BackReferenceWidget(
            label='Linked to resources',
            visible={'edit': 'invisible'},
        ),
    ),
))

RequestFields = atapi.Schema((
    atapi.DateTimeField(
        'startDate',
        widget=atapi.CalendarWidget(label='Start date',
                                    description='Until when is this needed?',
                                    show_hm=False),
    ),
    atapi.DateTimeField(
        'endDate',
        default=DateTime(END_OF_EUDAT2020),
        widget=atapi.CalendarWidget(
            label='End date',
            description="The defualt is the end of EUDAT's "
            "current project phase.",
            show_hm=False),
    ),
    atapi.ReferenceField(
        'preferred_providers',
        relationship='preferred_providers',
        multiValued=True,
示例#17
0
from zope.interface import implements

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

from uwosh.timeslot import timeslotMessageFactory as _
from uwosh.timeslot.interfaces import IDay, ICloneable
from uwosh.timeslot.config import PROJECTNAME

DaySchema = folder.ATFolderSchema.copy() + atapi.Schema((

    atapi.DateTimeField(
        'date',
        storage=atapi.AnnotationStorage(),
        required=True,
        widget=atapi.CalendarWidget(label=_('Date'),
                                    show_hm=False)
    ),

))

DaySchema['title'].required = False
DaySchema['title'].widget.visible = {
    'view': 'invisible',
    'edit': 'invisible',
}
DaySchema['title'].storage = atapi.AnnotationStorage()
DaySchema['description'].widget.visible = {
    'view': 'invisible',
    'edit': 'invisible',
示例#18
0
try:
    from Products.CMFPlone.factory import _IMREALLYPLONE5  # noqa
except ImportError:
    from archetypes.querywidget.field import QueryField
else:
    from plone.app.collection.field import QueryField

PROJECTNAME = 'plone.restapi.tests'

ATTestDocumentSchema = ATDocumentSchema.copy() + atapi.Schema((
    atapi.StringField('testStringField'),
    atapi.BooleanField('testBooleanField'),
    atapi.IntegerField('testIntegerField'),
    atapi.FloatField('testFloatField'),
    atapi.FixedPointField('testFixedPointField'),
    atapi.DateTimeField('testDateTimeField'),
    atapi.LinesField('testLinesField'),
    atapi.FileField('testFileField'),
    atapi.TextField('testTextField'),
    atapi.ImageField('testImageField'),
    atapi.ReferenceField('testReferenceField', relationship='testrelation'),
    atapi.ReferenceField(
        'testMVReferenceField', relationship='testrelation', multiValued=True),
    BlobField('testBlobField'),
    FileField('testBlobFileField'),
    ImageField('testBlobImageField'),
    QueryField('testQueryField'),
    atapi.StringField('testRequiredField', required=True),
    atapi.StringField('testReadonlyField', mode='r'),
    atapi.StringField('testWriteonlyField', mode='w'),
    atapi.StringField('testReadPermissionField',
示例#19
0
 ),
 atapi.StringField(
     'idNum',
     required=True,
     storage=atapi.AnnotationStorage(),
     widget=atapi.StringWidget(
         label=_(u'ID Number'),
         description=_(u'Official identification number of the announcement.'),
     ),
 ),
 atapi.DateTimeField(
     'releaseDate',
     required=True,
     storage=atapi.AnnotationStorage(),
     default_method='getCurrentDate',
     widget=atapi.CalendarWidget(
         label=_(u'Release Date'),
         description=_(u'Date when this announcement was released.'),
         show_hm=False,
     ),
 ),
 atapi.DateTimeField(
     'closingDate',
     required=True,
     storage=atapi.AnnotationStorage(),
     default_method='getCurrentDate',
     widget=atapi.CalendarWidget(
         label=_(u'Closing Date'),
         description=_(u'Date when applications close.'),
         show_hm=False,
     ),
示例#20
0
        'program',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(
            label="Program/Report",
            description="Program name",
        ),
        default="",
        required=True
    ),     

     atapi.DateTimeField(
        'revision',
        storage=atapi.AnnotationStorage(),
        widget=atapi.CalendarWidget(
            label='Revision',
            description='The date of the last revision',
            format='%d, %m, %Y',
            show_hm=False,
            starting_year=time.localtime()[0],
        ),    
        required=True,
    ),

     atapi.StringField(
        'title',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(
            label="Title",
            description="",
        ),
        default="",
        required=True,
示例#21
0
                    subfields=('value', 'unit'),
                    subfield_vocabularies={'unit': 'informationUnits'},
                    widget=ateapi.RecordWidget(condition=
                                               'python:here.stateIn(["pre_production","production"])'),
                    ),
 atapi.ReferenceField('project_enabler',
                      relationship='enabled_by',
                      allowed_types=('Person',),
                      widget=ReferenceBrowserWidget(label='Enabled by',
                                                    allow_browse=1,
                                                    startup_directory='/people',
                                                   ),
                      ),
 atapi.DateTimeField('start_date',
                     widget=atapi.CalendarWidget(label='Start date',
                                                 show_hm=False,
                                                 ),
                     ),
 ateapi.UrlField('call_for_collaboration',
                 widget=ateapi.UrlWidget(label='Call for collaboration',
                                         description='URL to the call that '\
                                         'triggered this project',
                                         ),
                 ),
 ateapi.UrlField('uptake_plan',
                 widget=ateapi.UrlWidget(label='Uptake plan',
                                         description='URL to the projects '\
                                         'uptake plan (if not on this site). '\
                                         'Often to be found on the '\
                                         'confluence site.',
                                         ),
示例#22
0
            widget=ImageWidget(
                description='',
                label=_(u'label_image', default=u'Image'),
                show_content_type=False,
                visible={
                    'view': 'visible',
                    'edit': 'visible'
                },
            )),
        atapi.DateTimeField(
            'DatetimeCreated',
            default_method=DateTime,
            widget=atapi.CalendarWidget(
                label='Date/Time Creation',
                description=
                'Select the date and time the photo of the biospecimen is taken.',
                ampm=1,
                visible={
                    'view': 'visible',
                    'edit': 'visible'
                },
            )),
    ),
    marshall=PrimaryFieldMarshaller())

title = schema['title']
title.required = 0
title.widget.visible = False


class Multimage(BaseContent):
示例#23
0
            validators=('isTidyHtmlWithCleanup', ),
            default_output_type='text/x-html-safe',
            default_input_type='text/html',
            storage=atapi.AnnotationStorage(),

            widget=atapi.RichWidget(
                label=_(u'task_label_text', default=u'Text'),
                description=_(u'task_help_text', default=u''))),

        atapi.DateTimeField(
            name='start_date',
            required=True,
            searchable=True,
            accessor='start',
            default_method='default_start_date',

            widget=FtwCalendarWidget(
                label=_(u'task_label_start_date', default=u'Start of Task'),
                description=_(u'task_help_start_date',
                              default=u'Enter the starting date and time, '
                              'or click the calendar icon and select it.'),
                visible={'edit': 'invisible', 'view': 'invisible'})),

        atapi.DateTimeField(
            name='end_date',
            required=True,
            searchable=True,
            accessor='end',
            default_method='default_end_date',

            widget=FtwCalendarWidget(
示例#24
0
from archetypes.referencebrowserwidget.widget import ReferenceBrowserWidget

from pcp.contenttypes.interfaces import IDowntime
from pcp.contenttypes.config import PROJECTNAME

from DateTime import DateTime


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

    atapi.DateTimeField('startDateTime',
                        required=True,
                        searchable=True,
                        accessor='start',  # compare ATContentTypes - Event
                        default_method=DateTime,
                        languageIndependent=True,
                        widget=DatetimeWidget(label='Start date (UTC)',
                                              pattern='yyyy/MM/dd HH:mm:ss UTC',
                                              description='When does the downtime start? In UTC!'),
                        ),

    atapi.DateTimeField('endDateTime',
                        required=True,
                        searchable=True,
                        accessor='end',  # compare ATContentTypes - Event
                        default_method=DateTime,
                        languageIndependent=True,
                        widget=DatetimeWidget(label='End date (UTC)',
                                              pattern='yyyy/MM/dd HH:mm:ss UTC',
                                              description='When does the downtime end? In UTC!'),
                        ),
示例#25
0
from Products.ATContentTypes.content import base
from Products.ATContentTypes.content import schemata

# -*- Message Factory Imported Here -*-

from pcp.contenttypes.interfaces import IResourceRequest
from pcp.contenttypes.config import PROJECTNAME
from pcp.contenttypes.content.common import CommonFields
from pcp.contenttypes.content.common import CommonUtilities


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

    # -*- Your Archetypes field definitions here ... -*-
    atapi.DateTimeField('startDate',
                        widget=atapi.CalendarWidget(label='Start date',
                                                    show_hm=False),
                        ),
    atapi.DateTimeField('endDate',
                        widget=atapi.CalendarWidget(label='End date',
                                                    show_hm=False),
                        ),
    atapi.StringField('ticketid'),
    atapi.ReferenceField('preferred_providers',
                         relationship='preferred_providers',
                         multiValued=True,
                         allowed_types=('Provider',),
                         widget=atapi.ReferenceWidget(label="Preferred providers",
                                                      ),
                         ),
    ateapi.RecordsField('compute_resources',
                        required=0,
示例#26
0
from DateTime.DateTime import *
from Products.CMFPlone.utils import getToolByName
from string import join

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

    # -*- Your Archetypes field definitions here ... -*-
    atapi.StringField(
        'subtitulo',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(label=_(u"Subtítulo"), ),
    ),
    atapi.DateTimeField(
        'data',
        storage=atapi.AnnotationStorage(),
        widget=atapi.CalendarWidget(label=_(u"Data"), ),
        required=True,
        validators=('isValidDate'),
    ),
    atapi.FileField(
        'foto',
        storage=atapi.AnnotationStorage(),
        widget=atapi.FileWidget(label=_(u"Foto"), ),
        required=True,
        validators=('isNonEmptyFile'),
    ),
    atapi.StringField(
        'downloadlink',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(label=_(u"Download link"), ),
    ),
示例#27
0
 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,
 ),
 atapi.StringField(
     'azienda',
     storage=atapi.AnnotationStorage(),
     widget=atapi.StringWidget(
         label=_(u"Azienda"),
         description=_(u"Inserisci la denominazione dell'azienda "
                       u"del richiedente"),
     ),
     required=False,
 ),
示例#28
0
     validators=('isTidyHtmlWithCleanup', ),
     default_output_type='text/x-html-safe',
     allowable_content_types=('text/plain', 'text/structured', 'text/html',
                              'application/msword'),
     widget=atapi.RichWidget(
         label=_(u"Action Items"),
         description=_(u"things to do for the next meeting"),
         rows=20,
         allow_file_upload=zconf.ATDocument.allow_document_upload,
     ),
 ),
 atapi.DateTimeField(
     'nextMeetingDateTime',
     storage=atapi.AnnotationStorage(),
     widget=atapi.CalendarWidget(
         label=_(u"Next Meeting Date and Time"),
         description=_(u"Field description"),
     ),
     validators=('isValidDate'),
 ),
 atapi.BooleanField(
     'attendeesCanEdit',
     storage=atapi.AnnotationStorage(),
     widget=atapi.BooleanWidget(
         label=_(u"Allow Attendees to Edit?"),
         description=
         _(u"If checked, allows listed attendees to edit this Meeting object and add/edit contained items"
           ),
     ),
     default=True,
 ),
示例#29
0
        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,                  
        languageIndependent=True,                  
        widget = atapi.CalendarWidget(                        
                  description= '',                        
                  label=_(u'label_event_start', 
                          default=u'Event Starts')          
        ),
    ),    
    atapi.ComputedField('start_date',        
        searchable=1,        
        expression='context._start_date()',       
    ),
    atapi.ComputedField('end_date',        
        searchable=1,        
        expression='context._end_date()',       
    ),
    atapi.ComputedField('duration',
示例#30
0
        columns=("texto", "texto_off"),        
        widget=DataGridWidget(
            label="Serviço",
            columns={
                'texto' : TextAreaColumn("Texto/Letreiro"),
                'texto_off' : TextAreaColumn("Texto do Off"),
            }            
        ),
        required=True,
    ),

    atapi.DateTimeField(
       name='entrega',
       default_method='getDataMinima',       
       widget=atapi.CalendarWidget(
           label="Entrega",
           description="Data e hora limite para entrega",
       ),
       required=True,
       validators=('isValidDate',),
    ),

    atapi.LinesField(
        name='infografista',
        widget=atapi.InAndOutWidget(
            label="Infografista",
            description="Campo de preenchimento exclusivo pela Gerência de Criação"
        ),
        vocabulary='getListaInfografistas',
        schemata="Arte",
    ),