class IContactRegistrantsForm(model.Schema): subject = schema.TextLine(title=_(u"Subject"), required=True) message = schema.Text(title=_(u"Message"), required=True) registrants = schema.Tuple( title=_(u"Registrants"), description=_( u"List of registered people that compiled email fields " u"(could be one of these fields: email, e-mail, replyto)."), required=False, default=(), missing_value=(), value_type=schema.Choice( source="collective.easyformplugin.registration.registrants"), ) waiting_list = schema.Tuple( title=_(u"Waiting list"), description=_( u"List of people in waiting list that compiled email fields " u"(could be one of these fields: email, e-mail, replyto)."), required=False, default=(), missing_value=(), value_type=schema.Choice( source="collective.easyformplugin.registration.waiting_list"), )
class IRERSiteSearchTabsSettings(Interface): """Settings used in the control panel for sitesearch: Tab list """ tabs_mapping = schema.Tuple( title=_(u'Search tabs'), description=_( 'help_tabs_mapping', default= u"Insert a list of tabs to show on search results. Each tab can contain different content_types." ), value_type=PersistentObject(ITabsValueField, title=_(u"Search tab")), required=False, default=(), missing_value=()) tabs_order = schema.Tuple( title=_(u'Tabs order'), description=_( 'help_tabs_order', default= u"Select the tabs that you want to show in the search and define an order." ), value_type=schema.Choice( vocabulary=u"rer.sitesearch.vocabularies.SearchTabsVocabulary"), required=False, default=("All", ), missing_value=())
class ITest(ITestBase): long_text = schema.Text(title=u"Long Text", default=u"Lorem Ipsum") ascii = schema.ASCIILine(title=u"ASCII", default="1234-abc") number1 = schema.Int(title=u"An int", default=24) number2 = schema.Float(title=u"An float", default=11.2) tf = schema.Bool(title=u"True or False", default=True) list_of = schema.List(title=u"A list", value_type=schema.TextLine(), default=['aaa', 'bbb']) tuple_of = schema.Tuple(title=u"A tuple", value_type=schema.TextLine(), default=(u'aaa', u'bbb')) tuple_of_2 = schema.Tuple(title=u"A tuple", value_type=schema.ASCIILine(), default=('ccc', 'ddd')) choose = schema.Choice( title=u"Choose", values=[1, 2, 3], default=1, ) multiple_choice = schema.Tuple(title=u"Multiple choice", default=(1, 3), value_type=schema.Choice(values=(1, 2, 3, 4))) unknown_type = schema.Tuple(title=u"A set of unknown", value_type=TestPersistentObject( IUnknown, title=u"A persistent something"), default=(Unknown(), ), missing_value=())
class IRelatedContentPortlet(IPortletDataProvider): portlet_title = schema.TextLine(title=u"Title for the portlet", default=u"Also See...", required=True) number_of_items = schema.Int( title=u"Number of items to display", description=u"What's the maximum number of items to appear " "in this portlet?", default=3) which_fields_relate = schema.Tuple( title=u'Which fields determine "relatedness"?', description= u'For which of the following fields must content need to overlap with the current page in order to be considered "related"?', default=(), value_type=schema.Choice( vocabulary= "onenw.pigeonhole.vocabularies.ActiveFieldsVocabularyFactory"), ) which_content_types = schema.Tuple( title=u"Which Content Types?", description= u"Which content types should be candidates for this portlet?", default=('Document', ), value_type=schema.Choice( vocabulary= "onenw.pigeonhole.vocabularies.PigeonholeTypesVocabularyFactory"), )
class ISimpleGroupManagementSettings(Interface): """Settings used in the control panel for simple group management """ sgm_data = schema.Tuple( title=_("Groups management proxy"), description= _("help_sgm_data", default="Configure which users or groups can manage which groups.\n" "Fill the field below by providing a set of \"user_foo_id|group_bar_id\"" " (or \"group_foo_id|group_bar_id\"), one per line.\n" "That means: the user/group on the left of the \"|\" can handle" " group on the right."), required=False, value_type=schema.TextLine(), default=(), missing_value=(), ) sgm_never_managed_groups = schema.Tuple( title=_("Not manageable groups"), description=_( "help_gm_never_managed_groups", default="Put here a list of groups that can't be managed by users" ), required=False, value_type=schema.TextLine(), default=( 'Administrators', 'Site Administrators', 'Reviewers', 'AuthenticatedUsers', ), missing_value=(), )
class ITemplate(Interface): name = schema.TextLine(title=u"Template name", min_length=2) base_type = schema.Choice(title=u"Template type", values=(u'xen', u'kvm', u'openvz')) cores = schema.Tuple( title=u"Number of virtual cores", description=u"Minimum, suggested and maximum number of cores", value_type=schema.Int(), required=False) memory = schema.Tuple( title=u"Memory size", description=u"Minimum, suggested and maximum memory size (in GB)", value_type=schema.Float(), required=False) swap = schema.Tuple( title=u"Memory size", description=u"Minimum, suggested and maximum memory size (in GB)", value_type=schema.Float(), required=False) disk = schema.Tuple( title=u"Disk size", description=u"Minimum, suggested and maximum disk size", value_type=schema.Float(), required=False) cpu_limit = schema.Tuple( title=u"CPU usage limits", description=u"Minimum, suggested and maximum cpu_limit", value_type=schema.Int(), required=False) username = schema.TextLine(title=u"Default username", required=False) password = schema.TextLine(title=u"Default password", required=False) ip = schema.TextLine(title=u"Default IP", required=False) nameserver = schema.TextLine(title=u"Default nameserver", required=False)
class IBasicMetadata(model.Schema): """ FISE generic required metadata """ topics = schema.Tuple( title=u"Topics", description=u"Relevant FISE topic", value_type=schema.TextLine(), required=False, missing_value=(), default=(), ) form.widget('topics', AjaxSelectFieldWidget, vocabulary='collective.taxonomy.topics') keywords = schema.Tuple(title=u"Keywords", description=u"Relevant FISE keywords", value_type=schema.TextLine(), required=False, missing_value=(), default=()) form.widget('keywords', AjaxSelectFieldWidget, vocabulary='collective.taxonomy.keywords')
class IOwnership(model.Schema): # ownership fieldset model.fieldset( 'ownership', label=_( 'label_schema_ownership', default=u'Ownership' ), fields=['creators', 'contributors', 'rights'], ) creators = schema.Tuple( title=_(u'label_creators', u'Creators'), description=_( u'help_creators', default=u'Persons responsible for creating the content of ' u'this item. Please enter a list of user names, one ' u'per line. The principal creator should come first.' ), value_type=schema.TextLine(), required=False, missing_value=(), ) directives.widget( 'creators', AjaxSelectFieldWidget, vocabulary='plone.app.vocabularies.Users' ) contributors = schema.Tuple( title=_(u'contributors', u'Contributors'), description=_( u'help_contributors', default=u'The names of people that have contributed ' u'to this item. Each contributor should ' u'be on a separate line.'), value_type=schema.TextLine(), required=False, missing_value=(), ) directives.widget( 'contributors', AjaxSelectFieldWidget, vocabulary='plone.app.vocabularies.Users' ) rights = schema.Text( title=_(u'label_copyrights', default=u'Rights'), description=_( u'help_copyrights', default=u'Copyright statement or other rights information on this ' u'item.' ), required=False, ) directives.omitted('creators', 'contributors', 'rights') directives.no_omit(IEditForm, 'creators', 'contributors', 'rights') directives.no_omit(IAddForm, 'creators', 'contributors', 'rights')
class IRERSiteSearchIndexesSettings(Interface): """Settings used in the control panel for sitesearch: Indexes to show """ available_indexes = schema.Tuple( title=_(u'Indexes for search'), description=_( 'help_sitesearch_available_indexes', default= u"Insert a list of indexes that should be used for faceted navigation." ), value_type=PersistentObject(IIndexesValueField, title=_(u"Index in search")), required=False, default=(), missing_value=()) indexes_order = schema.Tuple( title=_(u'Indexes order'), description=_( 'help_indexes_order', default= u"Select the indexes that you want to show for faceted navigation. You can define also the order. \"All\" tab shows all results." ), value_type=schema.Choice( vocabulary=u"rer.sitesearch.vocabularies.SearchIndexesVocabulary"), required=False, default=("Subject", ), missing_value=())
class IRelatedContacts(model.Schema): model.fieldset( 'related_contacts', label=_(u'Related contacts'), fields=('aboveContentContact', 'aboveVisbileFields', 'belowContentContact', 'belowVisbileFields', 'see_map', 'see_logo_in_popup'), ) aboveContentContact = RelationList( title=u'Above content related contact', default=[], value_type=RelationChoice( title=_(u'Related'), source=ObjPathSourceBinder(portal_type=('person', 'organization', 'held_position'))), required=False, ) form.widget(aboveVisbileFields=OrderedSelectFieldWidget) aboveVisbileFields = schema.Tuple( title=_(u'Visible fields for above viewlet'), description=_(u'Please select which fields should be visible.'), required=False, default=('street', 'number', 'zip_code', 'city', 'phone', 'cell_phone', 'fax', 'email', 'website', 'activity'), value_type=schema.Choice( vocabulary=u'cpskin.core.vocabularies.contact_fields')) belowContentContact = RelationList( title=u'Below content related contact', default=[], value_type=RelationChoice( title=_(u'Related'), source=ObjPathSourceBinder(portal_type=('person', 'organization', 'held_position'))), required=False, ) form.widget(belowVisbileFields=OrderedSelectFieldWidget) belowVisbileFields = schema.Tuple( title=_(u'Visible fields for below viewlet'), description=_(u'Please select which fields should be visible.'), required=False, default=('title', ), value_type=schema.Choice( vocabulary=u'cpskin.core.vocabularies.contact_fields')) see_map = schema.Bool( title=_(u'See map'), description=_(u'Do you want to map with links of contacts ?'), required=False, default=True) see_logo_in_popup = schema.Bool( title=_(u'See logo on map popup'), description=_(u'Do you want to logo of contact on the popup on map ?'), required=False, default=True)
class ISiteSyndicationSettings(Interface): allowed = schema.Bool(title=_(u'Allowed'), description=_( u'Allow syndication for collections and folders ' u'on site.'), default=True) default_enabled = schema.Bool( title=_(u'Enabled by default'), description=_(u'If syndication should be enabled by default for all ' u'folders and collections.'), default=False) search_rss_enabled = schema.Bool( title=_(u'Search RSS enabled'), description=_(u'Allows users to subscribe to feeds of search results'), default=True) show_author_info = schema.Bool( title=_(u'Show author info'), description=_(u'Should feeds include author information'), default=True) max_items = schema.Int( title=_(u'label_syndication_max_items', default=u'Maximum Items'), description=_( u'help_syndication_max_items', default=u'Maximum number of items that will be syndicated.'), default=15) allowed_feed_types = schema.Tuple( title=_(u'Allowed Feed Types'), description=_(u'Separate view name and title by "|"'), required=True, missing_value=None, default=("RSS|RSS 1.0", "rss.xml|RSS 2.0", "atom.xml|Atom", "itunes.xml|iTunes", "newsml.xml|NewsML 1.2"), value_type=schema.TextLine()) site_rss_items = schema.Tuple( title=_(u'Site RSS'), description=_(u'Paths to folders and collections to link to ' u'at the portal root.'), required=False, default=('/news/aggregator', ), value_type=schema.Choice( vocabulary="plone.app.vocabularies.SyndicatableFeedItems")) show_syndication_button = schema.Bool( title=_(u"Show Settings Button"), description=_(u"Makes it possible to customize syndication settings " u"for particular folders and collections ")) show_syndication_link = schema.Bool( title=_(u"Show Feed Link"), description=_(u"Enable RSS link document action on the syndication " u"content item."))
class ICachePurgingSettings(Interface): """Settings used by the purging algorithm. Should be installed into ``plone.registry``. """ enabled = schema.Bool( title=_(u"Enable purging"), description=_(u"If disabled, no purging will take place"), default=True, ) cachingProxies = schema.Tuple( title=_(u"Caching proxies"), description=_(u"Provide the URLs of each proxy to which PURGE " u"requests should be sent."), value_type=schema.URI(), ) virtualHosting = schema.Bool( title=_(u"Send PURGE requests with virtual hosting paths"), description=_(u"This option is only relevant if you are using " u"virtual hosting with Zope's VirtualHostMonster. " u"This relies on special tokens (VirtualHostBase " u"and VirtualHostRoot) in the URL to instruct " u"Zope about the types of URLs that the user sees. " u"If virtual host URLs are in use and this option " u"is set, PURGE requests will be sent to the " u"caching proxy with the virtual hosting tokens " u"in place. This makes sense if there is a web " u"server in front of your caching proxy performing " u"the rewrites necessary to translate a user-" u"facing URL into a virtual hosting URL, so that " u"the requests the caching proxy sees have the " u"rewrite information in them. Conversely, if the " u"rewrite is done in or behind the caching proxy, " u"you want to disable this option, so that the " u"PURGE requests use URLs that match those seen " u"by the caching proxy as they come from the " u"client."), required=True, default=False, ) domains = schema.Tuple( title=_(u"Domains"), description=_(u"This option is only relevant if you are using " u"virtual hosting and you have enabled the option " u"to send PURGE requests with virtual hosting URLs " u"above. If you your site is served on multiple " u"domains e.g. http://example.org and " u"http://www.example.org you may wish to purge " u"both. If so, list all your domains here"), required=False, default=(), missing_value=(), value_type=schema.URI(), )
class IOSHAItemsPortlet(IPortletDataProvider): """ """ header = schema.TextLine( title=_(u"Portlet header"), description=_(u"The display title of the rendered portlet"), required=True) count = schema.Int(title=_(u'Number of items to display'), required=True, default=3) types = schema.Tuple( title=_(u"Content Type"), description=_(u"Please specify the content types of the items " u"to be displayed in this portlet."), required=True, value_type=schema.Choice( vocabulary="osha.theme.FriendlyTypesVocabulary"), ) state = schema.Tuple( title=_(u"Workflow state"), description=_(u"You may limit the displayed items to a " u"specific workflow state. By default all " u"published items will be shown."), default=('published', ), required=True, value_type=schema.Choice( vocabulary="plone.app.vocabularies.WorkflowStates")) subject = schema.Tuple( title=_(u"Categories"), description=_(u"Pick one or more categories with which you want " u"to filter the items shown in this portlet."), default=tuple(), value_type=schema.Choice( vocabulary="osha.theme.SubjectValuesVocabulary"), ) sort = schema.Choice( title=_(u"Sorting Criterion"), description=_(u"Please choose the criterion on which the items " u"should be sorted."), default='effective', vocabulary="osha.theme.SortableIndexesVocabulary", ) portletlink = schema.Choice( title=_(u'Portlet link'), description=_(u"Choose a folder or page to which this portlet's " u"title and the bottom link will point to. This " u"is optional."), required=False, source=SearchableTextSourceBinder( { 'object_provides': [ folder.IATFolder.__identifier__, folder.IATBTreeFolder.__identifier__, document.IATDocument.__identifier__, ] }, default_query='path:'), )
class INavigationSchema(Interface): generate_tabs = schema.Bool( title=_(u"Automatically generate tabs"), description=_( u"By default, all items created at the root level will " u"add to the global section navigation. You can turn this off " u"if you prefer manually constructing this part of the " u"navigation."), default=True, required=False) nonfolderish_tabs = schema.Bool( title=_(u"Generate tabs for items other than folders."), description=_( u"By default, any content item in the root of the portal will " u"be shown as a global section. If you turn this option off, " u"only folders will be shown. This only has an effect if " u"'Automatically generate tabs' is enabled."), default=True, required=False) displayed_types = schema.Tuple( title=_(u"Displayed content types"), description=_( u"The content types that should be shown in the navigation and " u"site map."), required=False, default=('Image', 'File', 'Link', 'News Item', 'Folder', 'Document', 'Event'), value_type=schema.Choice( source="plone.app.vocabularies.ReallyUserFriendlyTypes")) filter_on_workflow = schema.Bool( title=_(u"Filter on workflow state"), description=_( u"The workflow states that should be shown in the navigation " u"tree and the site map."), default=False, required=False) workflow_states_to_show = schema.Tuple( required=False, default=(), value_type=schema.Choice( source="plone.app.vocabularies.WorkflowStates")) show_excluded_items = schema.Bool( title=_( u"Show items normally excluded from navigation if viewing their " u"children."), description=_( u"If an item has been excluded from navigation should it be " u"shown in navigation when viewing content contained within it " u"or within a subfolder."), default=True, required=False)
class IOptOutEntry(Interface): """Single entry for an Opt-Out application configuration """ app_id = schema.ASCIILine( title=_(u'Application ID'), description=_( 'app_id_help', default=u'A unique identifier for the application influenced bt this opt-out', ), # noqa default='', missing_value='', required=True, ) cookies = schema.Tuple( title=_(u'Cookies'), description=_( 'cookies_help', default=u'A list of cookies names prefixes.\n' u'This opt-out will generate a cookie in the form PREFIX-optout for every defined prefix.', ), # noqa required=True, value_type=schema.ASCIILine(), ) default_value = schema.Choice( title=_(u'Cookie(s) initial value'), description=_( 'default_value_help', default=u'When a user access for the first time the site, all of the opt-out cookies are set.\n' # noqa u'You must select the default value for those cookies.', ), # noqa required=True, default='true', vocabulary=trueFalseVocabulary, ) texts = schema.Tuple( title=_(u'Opt-out entry titles and descriptions'), description=_( 'help_optout_texts', default=u'For every involved language provide title and description that will be used ' # noqa u'for generate an translated opt-out dashboard.\n' u'In the case a specific translation is missing, the first in the list will be ' # noqa u'used as default.\n' u'If this field is not filler, a translation for "APPID_optout_title" ' # noqa u'and "APPID_optout_description" will be used.', ), value_type=OptOutEntrySubitemPersistentObject( IOptOutEntrySubitem, title=_(u'Opt-out title and description') ), required=False, default=(), missing_value=(), )
class ICronJob(IJob): """Parameters for cron jobs""" minute = schema.Tuple( title=u'minute(s)', default=(), required=False, ) hour = schema.Tuple( title=u'hour(s)', default=(), required=False, ) dayOfMonth = schema.Tuple( title=u'day of month', default=(), required=False, ) month = schema.Tuple( title=u'month(s)', default=(), required=False, ) dayOfWeek = schema.Tuple( title=u'day of week', default=(), required=False, ) delay = schema.Int( title=u'delay', default=0, required=False, ) scheduledFor = schema.Datetime( title=u'scheduled', default=None, required=False, ) def update(minute, hour, dayOfMonth, month, dayOfWeek, delay): """Update the cron job. The job must be rescheduled in the containing service. """ def timeOfNextCall(now=None): """Calculate the time for the next call of the job.
class IPloneCacheSettings(Interface): """Settings stored in the registry. Basic cache settings are represented by ``plone.caching.interfaces.ICacheSettings``. These are additional, Plone-specific settings. """ enableCompression = schema.Bool( title=_(u"Enable GZip compression"), description=_(u"Determine whether GZip compression should be " u"enabled for standard responses"), default=False, required=True, ) templateRulesetMapping = schema.Dict( title=_(u"Page template/ruleset mapping"), description=_(u"Maps skin layer page template names to ruleset names"), key_type=schema.ASCIILine(title=_(u"Page template name")), value_type=schema.DottedName(title=_(u"Ruleset name")), ) contentTypeRulesetMapping = schema.Dict( title=_(u"Content type/ruleset mapping"), description=_(u"Maps content type names to ruleset names"), key_type=schema.ASCIILine(title=_(u"Content type name")), value_type=schema.DottedName(title=_(u"Ruleset name")), ) purgedContentTypes = schema.Tuple( title=_(u"Content types to purge"), description=_( u"List content types which should be purged when modified"), value_type=schema.ASCIILine(title=_(u"Content type name")), default=( 'File', 'Image', 'News Item', ), ) cacheStopRequestVariables = schema.Tuple( title=_(u"Request variables that prevent caching"), description=_( u"Variables in the request that prevent caching if present"), value_type=schema.ASCIILine(title=_(u"Request variables")), default=( 'statusmessages', 'SearchableText', ), )
class IAutopublishSettingsSchema(Interface): publish_actions = schema.Tuple( value_type=schema.Object( title=_(u'Action'), schema=IAutopublishSpecification), title=_(u'Publish actions'), description=_(u"Workflow actions initiated by the autopublishing " u"module when the publishing date is met."), required=False, default=(), missing_value=()) retract_actions = schema.Tuple( value_type=schema.Object( title=_(u'Action'), schema=IAutopublishSpecification), title=_(u'Retract actions'), description=_(u"Workflow actions initiated by the autopublishing " u"module when the expiration date is met."), required=False, default=(), missing_value=()) overwrite_expiration_on_retract = schema.Bool( title=_(u'Set expiration date on retraction'), description=_(u"If this is set, the expiration date " u"will be overwritten with the current time " u"when manually retracting an item, to avoid " u" republication if there is a publication date " u"in the past."), default=False) clear_expiration_on_publish = schema.Bool( title=_(u'Clear expiration date on publication'), description=_(u"If this is set, an expiration date " u"in the past will be cleared " u"when manually publishing an item, to avoid " u"immediate retraction."), default=False) email_log = schema.List( value_type=schema.TextLine( title=u'Email'), title=_(u'Email addresses for audit log'), description=_(u"If one or more email addresses is supplied, " u"an audit log of the actions taken is sent."), required=False) dry_run = schema.Bool( title=_(u'Simulate'), description=_(u"Simulates the process of changing workflow state. " u"Nothing actually changes state, but it is possible to " u"review what actions will be taken. To activate " u"the module, remove the checkmark."), default=True)
class ICalendarExPortlet(IPortletDataProvider): """A portlet displaying a calendar with selectable path """ name = schema.TextLine( title=_(u'label_calendarex_title', default=u'Title'), description=_(u'help_calendarex_title', default=u'The title of this portlet. Leave blank to ' u'do not display portlet title.'), default=u"", required=False) root = schema.Choice( title=_(u'label_calendarex_root_path', default=u'Root node'), description=_(u'help_calendarex_root', default=u'You may search for and choose a folder ' u'to act as the root of search for this ' u'portlet. ' u'Leave blank to use the Plone site root. ' u'You can also select a Collection for ' u'get only Events found by it.'), required=False, source=SearchableTextSourceBinder( { 'object_provides': [ IATTopic.__identifier__, ICollection.__identifier__, IFolderish.__identifier__, IATFolder.__identifier__ ] }, default_query='path:')) review_state = schema.Tuple( title=_(u'Review state'), description=_('help_review_state', default=u'Filter contents using the review state. ' u'Leave blank to use the site default. ' u'This filter will be ignored if you select a ' u'collection as "Root node"'), default=(), value_type=schema.Choice( vocabulary='plone.app.vocabularies.WorkflowStates'), required=False) kw = schema.Tuple(title=_(u'Keywords'), description=_('help_keywords', default=u'Keywords to be search for. ' u'This filter will be ignored if ' u'you select a collection as ' u'"Root node"'), default=(), value_type=schema.TextLine())
class IOwnership(model.Schema): # ownership fieldset model.fieldset( 'ownership', label=_PMF( 'label_schema_ownership', default=u'Ownership' ), fields=['creators', 'contributors', 'rights'], ) creators = schema.Tuple( title=_PMF(u'label_creators', u'Creators'), description=_PMF( u'help_creators', default=u"Persons responsible for creating the content of " u"this item. Please enter a list of user names, one " u"per line. The principal creator should come first." ), value_type=schema.TextLine(), required=False, missing_value=(), ) contributors = schema.Tuple( title=_PMF(u'label_contributors', u'Contributors'), description=_PMF( u'help_contributors', default=u"The names of people that have contributed " u"to this item. Each contributor should " u"be on a separate line."), value_type=schema.TextLine(), required=False, missing_value=(), ) rights = schema.Text( title=_PMF(u'label_copyrights', default=u'Rights'), description=_PMF( u'help_copyrights', default=u'Copyright statement or other rights information on this ' u'item.' ), required=False, ) form.omitted('creators', 'contributors', 'rights') form.no_omit(IEditForm, 'creators', 'contributors', 'rights') form.no_omit(IAddForm, 'creators', 'contributors', 'rights')
class IEEAContentTypesSettings(Interface): """ portal_registry EEAContentTypes settings """ hideGeographicalCoverageFor = schema.Tuple( title=_(u"Hide Geographic Coverage Viewlet"), description=_(u"Hide the Geographic Coverage Viewlet for the " "following content-types"), required=False, default=('EEAFigure', 'Data', 'Assessment', 'IndicatorFactSheet', 'Event', 'QuickEvent', 'Organisation'), value_type=schema.Choice( vocabulary="plone.app.vocabularies.ReallyUserFriendlyTypes")) hideTemporalCoverageFor = schema.Tuple( title=_(u"Hide Temporal Coverage Viewlet"), description=_(u"Hide the Temporal Coverage Viewlet for the " "following content-types"), required=False, default=('EEAFigure', 'Data', 'Assessment', 'IndicatorFactSheet'), value_type=schema.Choice( vocabulary="plone.app.vocabularies.ReallyUserFriendlyTypes")) noTemporalCoverageSubtyperFor = schema.Tuple( title=_(u"Disable Temporal Coverage Schema Extender"), description=_( u"Disables the Temporal Coverage Schema Extender for the " "following content-types"), required=False, default=('Assessment', 'IndicatorFactSheet', 'Link'), value_type=schema.Choice( vocabulary="plone.app.vocabularies.ReallyUserFriendlyTypes")) fullwidthFor = schema.Tuple( title=_(u"Fullwidth ContentTypes"), description=_(u"Enable body fullwidth class for the " "following content-types"), required=False, default=('GIS Application', ), value_type=schema.Choice( vocabulary="plone.app.vocabularies.ReallyUserFriendlyTypes")) scrollAnalyticsFor = schema.Tuple( title=_(u"Scroll Analytics"), description=_(u"Enable scroll analytics class for the " "following content-types"), required=False, default=('Article', 'Fiche', 'Highlight', 'Assessment'), value_type=schema.Choice( vocabulary="plone.app.vocabularies.ReallyUserFriendlyTypes"))
class ICalendarPortlet(IPortletDataProvider): """A portlet displaying a calendar """ state = schema.Tuple( title=_(u"Workflow state"), description=_(u"Items in which workflow state to show."), default=None, required=False, value_type=schema.Choice( vocabulary="plone.app.vocabularies.WorkflowStates") ) search_base_uid = schema.Choice( title=_(u'portlet_label_search_base', default=u'Search base'), description=_( u'portlet_help_search_base', default=u'Select search base Folder or Collection to search for ' u'events. The URL to to this item will also be used to ' u'link to in calendar searches. If empty, the whole site ' u'will be searched and the event listing view will be ' u'called on the site root.' ), required=False, source=search_base_uid_source, )
class INewsletterSubscribe(Interface): email = schema.TextLine(title=_(u"Email address"), description=_( u"help_email", default=u"Please enter your email address."), required=True, constraint=validate_email) interest_groups = schema.Tuple( title=_(u"Interest groups"), description=_(u"help_interest_groups", default=u""), value_type=schema.Choice( vocabulary="collective.mailchimp.vocabularies.InterestGroups", ), required=False, ) email_type = schema.Choice( title=_(u"Mail format"), vocabulary="collective.mailchimp.vocabularies.EmailType", default="text", required=False, ) list_id = schema.TextLine(title=_(u"List ID"), required=False)
class IModernizr(interface.Interface): """Modernizr settings""" tests = schema.Tuple(title=u"Tests", description=u"Write only the tests you need.", value_type=schema.ASCIILine(title=u"Test"), default=tuple())
class IComunicatoStampa(model.Schema): arguments = schema.Tuple( title=_("arguments_label", default=u"Arguments"), description=_("arguments_help", default="Select one or more values."), value_type=schema.TextLine(), required=True, missing_value=(), ) directives.widget( "arguments", AjaxSelectFieldWidget, vocabulary="rer.ufficiostampa.vocabularies.arguments", pattern_options={"allowNewItems": "false"}, ) legislature = schema.TextLine( title=_(u"label_legislature", default=u"Legislature"), description=u"", required=True, defaultFactory=defaultLegislature, ) directives.mode(legislature="display") message_sent = schema.Bool( title=_(u"label_sent", default=u"Sent"), description=u"", required=False, default=False, ) comunicato_number = schema.TextLine(title=u"", description=u"", required=False) directives.omitted("message_sent") directives.omitted("comunicato_number")
class UserTriggerSchema(Interface): ''' Define schema for add rule form ''' ifttt_event_name = schema.TextLine( title=_(u'IFTTT event name'), description=_( u'Give the name of the IFTTT event which you want to trigger. ' u'This will be part of the IFTTT webhook URL so should ' u'not contain' u' white space or special characters - for ' u'example mysite_modified.'), required=True, constraint=validate_ifttt_event_name, ) forms.widget('content_types', SelectFieldWidget) content_types = schema.Tuple( title=_(u'Content Types'), description=_(u'Select the content types to restrict this event to'), required=True, missing_value=None, default=(), value_type=schema.Choice( vocabulary='plone.app.vocabularies.ReallyUserFriendlyTypes'))
class ICategorization(model.Schema): # categorization fieldset model.fieldset( 'categorization', label=_PMF(u'label_schema_categorization', default=u'Categorization'), fields=['subjects', 'language'], ) subjects = schema.Tuple( title=_PMF(u'label_tags', default=u'Tags'), description=_PMF( u'help_tags', default= u'Tags are commonly used for ad-hoc organization of content.'), value_type=schema.TextLine(), required=False, missing_value=(), ) form.widget(subjects=TextLinesFieldWidget) language = schema.Choice( title=_PMF(u'label_language', default=u'Language'), vocabulary='plone.app.vocabularies.AvailableContentLanguages', required=False, missing_value='', ) form.omitted('subjects', 'language') form.no_omit(IEditForm, 'subjects', 'language') form.no_omit(IAddForm, 'subjects', 'language')
class IRichText(IObject): """A text field that stores MIME type """ default_mime_type = schema.ASCIILine( title=_(u"Default MIME type"), default='text/html', ) output_mime_type = schema.ASCIILine(title=_(u"Default output MIME type"), default='text/x-html-safe') allowed_mime_types = schema.Tuple( title=_(u"Allowed MIME types"), description=_(u"Set to None to disable checking"), default=None, required=False, value_type=schema.ASCIILine(title=u"MIME type"), ) max_length = schema.Int( title=_(u'Maximum length'), description=_(u'in characters'), required=False, min=0, default=None, )
class ITestPortlet(IPortletDataProvider): test_text = schema.TextLine(title=u"Test") test_bool = schema.Bool(title=u"Test") test_tuple = schema.Tuple( title=u"Test", value_type=schema.Choice( vocabulary="plone.app.vocabularies.WorkflowStates"))
class IFeedSettings(Interface): enabled = schema.Bool(title=_(u'Enabled'), default=False) feed_types = schema.Tuple( title=_(u'Feed Types'), required=True, missing_value=None, default=("RSS", "rss.xml", "atom.xml"), value_type=schema.Choice( vocabulary="plone.app.vocabularies.SyndicationFeedTypes")) render_body = schema.Bool(title=_(u'Render Body'), description=_( u'help_render_body', default=u'If body text available for item, ' u'render it, otherwise use description.'), default=False) max_items = schema.Int( title=_(u'label_syndication_max_items', default=u'Maximum Items'), description=_( u'help_syndication_max_items', default=u'Maximum number of items that will be syndicated.'), default=15)