name='compatibility',
     required=1,
     searchable=1,
     index='KeywordIndex:schema',
     vocabulary='getCompatibilityVocab',
     widget=atapi.MultiSelectionWidget(
         label=u"Compatibility",
         description=u"Tested and working with the following versions:",
         i18n_domain='collective.TemplateUploadCenter',
     ),
 ),
 atapi.BooleanField(
     'acceptdisclaimer',
     required=1,
     widget=atapi.BooleanWidget(
         label=u"Accept the Legal Disclaimer and Limitations below:",
         description=
         u"<h3>Legal Disclaimers and Limitations</h3><p>The text for the disclaimer and limitations go here.</p>",
         i18n_domain="collective.TemplateUploadCenter",
     ),
 ),
 atapi.TextField(
     'contributors',
     widget=atapi.TextAreaWidget(
         i18n_domain='collective.TemplateUploadCenter',
         visible={
             'edit': 'hidden',
             'view': 'hidden'
         },
     ),
 ),
 atapi.TextField(
Exemplo n.º 2
0
                       label=_(u"Complexidade"),
                       description=_(u"Complexidade"),
                   )),
 atapi.FloatField(name='multiplicador',
                  required=True,
                  searchable=True,
                  default=1.0,
                  widget=atapi.StringWidget(
                      label=_(u"Multiplicador"),
                      description=_(u"Multiplicador"),
                      size=10,
                  )),
 atapi.BooleanField(name='deflator',
                    required=False,
                    searchable=True,
                    widget=atapi.BooleanWidget(
                        label=_(u"Deflator"),
                        description=_(u"Aplicar deflator"),
                    )),
 atapi.FloatField(name='valor_deflator',
                  required=False,
                  searchable=True,
                  widget=atapi.StringWidget(
                      label=_(u"Valor do deflator"),
                      description=_(u"Valor do deflator"),
                      size=10,
                  )),
 atapi.StringField(name='chamado',
                   required=False,
                   searchable=True,
                   widget=atapi.StringWidget(
Exemplo n.º 3
0
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"), ),
    ),
    atapi.LinesField(
        'EmailSubject',
        schemata='Preferences',
        default=[
            'ar',
        ],
        vocabulary=EMAIL_SUBJECT_OPTIONS,
            description=
            _(u'help_smartlink_internallink',
              default=
              (u"Browse to find the internal page to which you wish to link. "
               u"If this field is used, then any entry in the external link field will be ignored. "
               u"You cannot have both an internal and external link.")),
            force_close_on_insert=True,
        )),
    atapi.BooleanField(
        'internalProxy',
        required=False,
        searchable=False,
        default=False,
        widget=atapi.BooleanWidget(
            label=_(u'label_internalProxy',
                    default=u"Use referenced content's data"),
            description=_(
                u'help_internalProxy',
                default=
                (u'When active and an internal link is used, '
                 u'the Link content will use title and description from the referenced content.'
                 )),
            condition='object/proxy_enabled')),

    # ******* Advanced tab *******
    atapi.StringField(
        'anchor',
        required=False,
        searchable=False,
        default='',
        schemata="Advanced",
        required=True,
        enforceVocabulary=True,
        vocabulary_display_path_bound=-1,
        vocabulary_factory=u'edrnsite.funding.OpportunityTypeVocabulary',
        storage=atapi.AnnotationStorage(),
        widget=atapi.SelectionWidget(
            label=_(u'Opportunity Type'),
            description=_(u'The kind of opportunity being made available'),
        ),
    ),
    atapi.BooleanField(
        'reissuable',
        required=False,
        storage=atapi.AnnotationStorage(),
        widget=atapi.BooleanWidget(
            label=_(u'Reissuable'),
            description=
            _(u'True if this funding opportunity may be reissued, false otherwise.'
              ),
        ),
    ),
))
FundingOpportunitySchema['title'].storage = atapi.AnnotationStorage()
FundingOpportunitySchema['description'].storage = atapi.AnnotationStorage()

finalizeATCTSchema(FundingOpportunitySchema,
                   folderish=True,
                   moveDiscussion=False)


class FundingOpportunity(folder.ATFolder):
Exemplo n.º 6
0
     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"
     )
 ),
 atapi.LinesField('required_for',
     schemata='default',
     vocabulary_factory='eea.relations.voc.workflowstates',
     widget=atapi.MultiSelectionWidget(
         format='checkbox',
         label='Required for',
         label_msgid='widget_required_for_title',
         description=('Select workflow states that will require this '
                      'relation before setup (action: change state). '
                      'You will also have to update workflow '
Exemplo n.º 7
0
        default='',
        mode="w",
        required=False,
        widget=atapi.StringWidget(
            label=u"ID for soup to use as storeage",
            description=u"Enter an existing or new ID to identify "
            u"the target soup.",
        )))

atfields.append(
    atapi.BooleanField(
        'reedit',
        schemata='default',
        default=False,
        mode="w",
        required=False,
        widget=atapi.BooleanWidget(
            label=u"Auto re-edit own form data",
            description=u"Users  are shown their own form data on subsequent "
            u"visits in order to change/edit it.",
        )))

for aid in AUTOFIELDS:
    atfields.append(
        atapi.BooleanField(
            'show_%s' % aid,
            schemata='default',
            default=False,
            mode="w",
            required=False,
            widget=atapi.BooleanWidget(
Exemplo n.º 8
0
        relationship='link_interno',
        multiValued=False,
    ),
    ImageField(
        name='imagem',
        widget=atapi.ImageWidget(
            label=_(u'Imagem do Banner'),
            description=_(u'Escolha da imagem do banner.'),
        ),
        required=False,
    ),
    atapi.BooleanField(
        name='linkTarget',
        default=False,
        widget=atapi.BooleanWidget(
            label=_(u'Abrir link em nova janela'),
            description=_(
                u'Caso selecionado o link sera exibido em uma nova janela'),
        ),
        required=False,
    ),
))

schemata.finalizeATCTSchema(BannerSchema)

BannerSchema['remoteUrl'].required = False
BannerSchema['remoteUrl'].default = ''
BannerSchema['remoteUrl'].widget.label = _(u'Link Externo')
BannerSchema['remoteUrl'].widget.description = _(
    u'Sera utilizado quando nao houver link interno.')

Exemplo n.º 9
0
        required=False,
        searchable=1,
        #default='',
        storage=atapi.AnnotationStorage(),
        widget=atapi.StringWidget(
            visible = {'edit' : 'invisible', 'view' : 'invisible' },
            label=_(u"Part of Proposed Panel"),
            description=_(u"Is your paper part of a panel proposal? Fill in only if you or a colleage are submitting a panel as well, leave blank otherwise."),
        ),
    ),

    atapi.BooleanField('isPanel',
    	required = False,
    	languageIndependent = True,
    	widget = atapi.BooleanWidget(
                visible = {'edit' : 'invisible', 'view' : 'invisible' },
    	        label= _(u"Is this a panel?"),
    	        description = _(u"Consider this proposal a panel rather than a paper."),
    	),
    ),
))

# Set storage on fields copied from ATFolderSchema, making sure
# they work well with the python bridge properties.
def finalizeConferenceSchema(schema):
    schema['title'].storage = atapi.AnnotationStorage()
    schema['description'].storage = atapi.AnnotationStorage()
    schema['description'].required = True
    schema['description'].widget.label = _('Abstract')
    schema['description'].widget.description = _('A short summary of your article.')
    schema['subject'].storage = atapi.AnnotationStorage()
     enforceVocabulary=1,
     index='KeywordIndex:schema',
     schemata="review",
     widget=atapi.MultiSelectionWidget(
         label=u'Self-Certification Checklist',
         description=u'Check which criteria this project fulfills.',
         i18n_domain="collective.TemplateUploadCenter",
         format="checkbox",
     ),
 ),
 atapi.BooleanField(
     'isApproved',
     required=0,
     #write_permission=ApproveProject,
     schemata="review",
     widget=atapi.BooleanWidget(
         label=u'Approved',
         description=
         u'Indicate whether this project is approved by product reviewers.',
         i18n_domain="collective.TemplateUploadCenter",
     ),
 ),
 atapi.TextField(
     'reviewComment',
     searchable=1,
     required=0,
     schemata="review",
     #write_permission=AddReviewComment,
     widget=atapi.TextAreaWidget(
         label=u'Review Comment',
         description=u'Additional notes by reviewers of this project.',
         i18n_domain="collective.TemplateUploadCenter",
Exemplo n.º 11
0
                        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',
        storage=atapi.AnnotationStorage(),
        widget=atapi.BooleanWidget(
            label=_(u'Allow Waiting List'),
            description=_(u'Check if you want to allow signups to waiting '
                          'list once max capacity is reached'))),
))

TimeSlotSchema['title'].required = False
TimeSlotSchema['title'].widget.visible = {
    'view': 'invisible',
    'edit': 'invisible',
}
TimeSlotSchema['title'].storage = atapi.AnnotationStorage()
TimeSlotSchema['description'].widget.visible = {
    'view': 'invisible',
    'edit': 'invisible',
}
 def getField(self, name):
     from Products.Archetypes import atapi
     return atapi.BooleanField('presentation')
Exemplo n.º 13
0
                      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
    """
    implements(IWorkshopFolder)
    security = ClassSecurityInfo()

    portal_type = "WorkshopFolder"
    _at_rename_after_creation = True
     'host_os',
     searchable=1,
     widget=atapi.StringWidget(
         label='Host operating system',
         description='Alphanumeric and basic punctuation',
     ),
 ),
 atapi.StringField(
     'host_architecture',
     searchable=1,
     widget=atapi.StringWidget(
         label='Host architecture',
         description='Alphanumeric and basic punctuation',
     ),
 ),
 atapi.BooleanField('monitored'),
 atapi.ComputedField(
     'registry_link',
     expression='here.getCregURL()',
     widget=atapi.ComputedWidget(label='Central Registry'),
 ),
 ateapi.RecordsField(
     'implementation_configuration',
     accessor='getImplementationConfiguration',
     mutator='setImplementationConfiguration',
     schemata='details',
     read_permission='View internals',
     write_permission='Modify internals',
     searchable=0,
     subfields=('key', 'value'),
     minimalSize=3,
Exemplo n.º 15
0
from Products.ATContentTypes.content.document import ATDocumentBase
from Products.ATContentTypes.content.document import ATDocumentSchema
from Products.CMFCore import permissions

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"),
Exemplo n.º 16
0
from Products.ATReferenceBrowserWidget.ATReferenceBrowserWidget import \
    ReferenceBrowserWidget

###########################################################
# Quiz
###########################################################
quiz_schema = atapi.Schema((
    atapi.BooleanField(
        "randomOrder",
        accessor='isRandomOrder',
        required=False,
        default=True,
        storage=atapi.AnnotationStorage(),
        widget=atapi.BooleanWidget(
            label=_(u'Randomize Question Order'),
            description=_(
                u'Check this box if you want the questions '
                u'in this container to appear in a different, random '
                u'order for each candidate. Otherwise the same order '
                u'as in the &quot;contents&quot;-view will be used.'),
        ),
    ),
    atapi.IntegerField(
        "numberOfRandomQuestions",
        required=False,
        default=-1,
        storage=atapi.AnnotationStorage(),
        widget=atapi.IntegerWidget(
            label=_(u'Number of Random Questions'),
            description=_(u'The number of questions which are randomly '
         label=_(u"EasyNewsletter_label_default_footer", default=u"Footer"),
         description=_(
             u'description_text_footer',
             default=u'The default footer text. This is used as a default \
                 for new issues. You can use the placeholders \
                 [[SUBSCRIBER_SALUTATION]] and [[UNSUBSCRIBE]] here.'),
         i18n_domain='EasyNewsletter',
     ),
 ),
 atapi.BooleanField(
     'sendToAllPloneMembers',
     default=False,
     widget=atapi.BooleanWidget(
         label=_(u'label_sendToAllPloneMembers',
                 default=u'Send to all Plone members'),
         description=_(
             u'help_sendToAllPloneMembers',
             default=u'If checked, the newsletter/mailing is send to all \
                 plone members. If there are subscribers inside the \
                 newsletter, they get the letter anyway.'),
         i18n_domain='EasyNewsletter',
     )),
 atapi.LinesField(
     'ploneReceiverMembers',
     vocabulary="get_plone_members",
     widget=atapi.MultiSelectionWidget(
         label=_(u"EasyNewsletter_label_ploneReceiverMembers",
                 default=u"Plone Members to receive the newsletter"),
         description=_(
             u"EasyNewsletter_help_ploneReceiverMembers",
             default=
        ),
        write_permission=SetOwnProperties,
        schemata="User Settings",
        vocabulary="_availableEditors",
        user_property='wysiwyg_editor',
    ),

    atapi.BooleanField('userpref_ext_editor',
        widget=atapi.BooleanWidget(
            label=_(u"label_ext_editor", default=u"Enable external editing"),
            description=_(u"help_content_ext_editor",
                          default=u"When checked, an icon will be made visible on each page "
                                  u"which allows you to edit content with your favorite editor "
                                  u"instead of using browser-based editors. This requires an "
                                  u"additional application called ExternalEditor installed "
                                  u"client-side. Ask your administrator for more information if "
                                  u"needed."),
            i18n_domain='plone',
            condition="python:'FSDPerson' in modules['Products.CMFCore.utils'].getToolByName(here, 'facultystaffdirectory_tool').getEnableMembraneTypes()",  # noqa
            ),
        write_permission=SetOwnProperties,
        schemata="User Settings",
        user_property='ext_editor',
        default=False,
    ),

    atapi.StringField('userpref_portal_skin',
        widget=atapi.SelectionWidget(
            label=_(u"label_look", default=u"Look"),
            description=_(u"help_look", default=u"Appearance of the site."),
            i18n_domain='plone',
            format="select",
Exemplo n.º 19
0
ACTIVE_STATES = ["active"]


schema = Person.schema.copy() + atapi.Schema((
    atapi.LinesField('PublicationPreference',
                     vocabulary_factory='bika.lims.vocabularies.CustomPubPrefVocabularyFactory',
                     schemata='Publication preference',
                     widget=atapi.MultiSelectionWidget(
                         label=_("Publication preference"),
                     )),
    atapi.BooleanField('AttachmentsPermitted',
                       default=False,
                       schemata='Publication preference',
                       widget=atapi.BooleanWidget(
                           label=_("Results attachments permitted"),
                           description=_(
                               "File attachments to results, e.g. microscope "
                               "photos, will be included in emails to recipients "
                               "if this option is enabled")
                       )),
    atapi.ReferenceField('CCContact',
                         schemata='Publication preference',
                         vocabulary='getContacts',
                         multiValued=1,
                         allowed_types=('Contact',),
                         relationship='ContactContact',
                         widget=atapi.ReferenceWidget(
                             checkbox_bound=0,
                             label=_("Contacts to CC"),
                         )),
))
Exemplo n.º 20
0
from plone.app.blob.field import FileField
from plone.app.blob.field import ImageField
from plone.app.folder.folder import ATFolder
from plone.app.folder.folder import ATFolderSchema
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'),
Exemplo n.º 21
0
        searchable=True,
    ),

    atapi.LinesField(
        name='turno',
        widget=atapi.MultiSelectionWidget(
            label='Turno',
            format='checkbox',
        ),
        enforceVocabulary=True,
        vocabulary=['Manhã','Tarde','Noite'],
    ),

    atapi.BooleanField(
        name='nota',
        widget=atapi.BooleanWidget(
            label='Nota',
        ),
    ),


    atapi.BooleanField(
        name='monitorar',
        widget=atapi.BooleanWidget(
            label='Monitorar',
        ),
    ),

    atapi.LinesField(
        name='vcg',
        widget=atapi.SelectionWidget(
            label="Vocabulário Controlado",
Exemplo n.º 22
0
 atapi.FixedPointField(
     'price',
     default="0.00",
     required=0,
     languageIndependent=True,
     widget=atapi.DecimalWidget(
         label=_(u"label_price", default=u"Price"),
         description=_(u"desc_price", default=u""),
         size=8,
     ),
 ),
 atapi.BooleanField(
     'showPrice',
     default=False,
     languageIndependent=True,
     widget=atapi.BooleanWidget(
         label=_(u"label_show_price", default=u"Show price"),
         description=_(u"desc_show_price", default=u""),
     ),
 ),
 atapi.StringField(
     'skuCode',
     required=0,
     languageIndependent=True,
     widget=atapi.StringWidget(
         label=_(u"label_sku_code", default=u"SKU code"),
         description=_(u"desc_sku_code", default=u""),
     ),
 ),
 atapi.TextField(
     name='unit',
Exemplo n.º 23
0
         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?',
                 default=u'Is this a Department Chat Widget?'),
     )),
 atapi.BooleanField(
     'isTop',
     required=False,
     searchable=False,
     default=False,
     validators=(),
     widget=atapi.BooleanWidget(
         description=
         'This will force this profile to the top of the staff directories.',
         label=_(u'Is this person the Director?',
Exemplo n.º 24
0
                                          description=_('attachmentStorage_help',
                                                        default=u"Select the folder where users will be able to store attachments for "
                                                                u"attachment-like columns (if any).\n"
                                                                u"Users must be able to add new contents on that folder; if not, they "
                                                                u"will be only able to select existings items.\n"
                                                                u"If not provided, the folder containing this document will be used."),
                                          force_close_on_insert=True,
                                          visible={'view': 'invisible', 'edit': 'visible'},
                                          ),
    ),

    atapi.BooleanField('downloadEnabled',
              required=False,
              searchable=False,
              schemata="settings",
              widget=atapi.BooleanWidget(
                        label=_(u'Show download link for data'),
                        description=_('help_download_enabled',
                                      default=u'Display a download link for data inside the table in CSV format'),
            ),
    ),

    atapi.StringField('showHeaders',
              searchable=False,
              schemata="settings",
              default="always",
              vocabulary="showHeadersVocabulary",
              enforceVocabulary=True,
              widget=atapi.SelectionWidget(
                        label=_(u'Show headers'),
                        description=_(u'Show table headers when...'),
            ),
Exemplo n.º 25
0
                u'description_text_footer',
                default=u'The default footer text. This is used as a default \
                    for new issues. You can use the placeholders \
                    {{SUBSCRIBER_SALUTATION}} and {{UNSUBSCRIBE}} here.'),
            i18n_domain='EasyNewsletter',
        ),
    ),

    atapi.BooleanField(
        'excludeAllSubscribers',
        default=False,
        schemata='recipients',
        widget=atapi.BooleanWidget(
            label=_(
                u'label_excludeAllSubscribers',
                default=u'Exclude all subscribers'),
            description=_(
                u'help_excludeAllSubscribers',
                default=u'If checked, the newsletter/mailing will not be send  \
                   to all subscribers inside the newsletter. Changing this \
                   setting does not affect already existing issues.'),
            i18n_domain='EasyNewsletter',
        )
    ),

    atapi.BooleanField(
        'sendToAllPloneMembers',
        default=False,
        schemata='recipients',
        widget=atapi.BooleanWidget(
            label=_(
                u'label_sendToAllPloneMembers',
Exemplo n.º 26
0
 ),
 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,
 ),
 atapi.StringField(
     'notifyAttendeesByEmail',
     storage=atapi.AnnotationStorage(),
     widget=atapi.SelectionWidget(
         label=_(u"Notify Attendees by Email?"),
         description=
         _(u"Select which type of email notification to send to listed attendees"
           ),
     ),
     required=True,
Exemplo n.º 27
0
from Products.ATContentTypes.content import schemata

from uwosh.timeslot import timeslotMessageFactory as _
from uwosh.timeslot.interfaces import ISignupSheet
from uwosh.timeslot.config import PROJECTNAME
from uwosh.timeslot.utilities import getAllExtraFields

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'),
Exemplo n.º 28
0
schema = atapi.Schema((
    atapi.LinesField(
        name='feeds',
        widget=atapi.LinesWidget(description=_(
            "help_feeds",
            default="List of rss feeds. You can prefix feed link titles "
            "using | separator. It is probably a good idea to add a colon "
            "or dash at the end of the prefix "
            "('My place: |http://myplace/feed')."),
                                 label=_('feedfeeder_label_feeds',
                                         default='Feeds'))),
    atapi.BooleanField(
        name='redirect',
        widget=atapi.BooleanWidget(
            description=_(
                "help_redirect",
                default="If checked the feed item will be automatically "
                "redirected if you don't have the edit permission."),
            label=_('label_redirect',
                    default='Automatic redirect of feed items'))),
    atapi.StringField(
        name='defaultTransition',
        vocabulary='getAvailableTransitions',
        widget=atapi.SelectionWidget(
            format='select',
            description=_(
                'help_default_transition',
                default="When updating this feed's item the transition "
                "selected below will be performed."),
            label=_('label_default_transition', default='Default transition'),
        )),
Exemplo n.º 29
0
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"), ),
    ),
    atapi.LinesField(
        'EmailSubject',
        schemata=PMF('Preferences'),
        default=[
            'ar',
Exemplo n.º 30
0
                         relationship='contact_for',
                         allowed_types=('Person',),
                         widget=ReferenceBrowserWidget(
                             allow_sorting=1,
                             allow_search=1,
                             allow_browse=1,
                             force_close_on_insert=1,
                             startup_directory='/people',
                             use_wildcard_search=True,
                         ),
                         ),
    atapi.TextField('account',
                    widget=atapi.TextAreaWidget(),
                    ),
    ateapi.UrlField('terms_of_use'),
    atapi.BooleanField('rootaccess'),
    atapi.TextField('setup_procedure',
                    widget=atapi.TextAreaWidget(),
                    ),
    atapi.TextField('firewall_policy',
                    widget=atapi.TextAreaWidget(),
                    ),
)) + CommonFields


schemata.finalizeATCTSchema(
    EnvironmentSchema,
    folderish=True,
    moveDiscussion=False
)