def getCompanySizes(self): """ Get the available company sizes Hardcoded for now, but may change later on """ return atapi.DisplayList( [("none", _(u"none")), ("small", _(u"small")), ("medium", _(u"medium")), ("large", _(u"large"))] )
def getCompanySizes(self): """ Get the available company sizes Hardcoded for now, but may change later on """ return atapi.DisplayList([("none", _(u"none")), ("small", _(u"small")), ("medium", _(u"medium")), ("large", _(u"large"))])
from AccessControl import getSecurityManager from zope.interface import implements from Products.Archetypes import atapi from Products.PloneServicesCenter import PSCMessageFactory as _ from Products.PloneServicesCenter.interfaces import ISiteUsingPlone from Products.PloneServicesCenter.content import Services schema = Services.servicesSchema + atapi.Schema(( atapi.ReferenceField('provider', widget=atapi.ReferenceWidget( checkbox_bound=0, label=_(u"label_psc_provider_cat", default=u"Provider"), description=_(u"help_siteuseplone_provider", default=u"Select provider(s) from the below listing for the Site that Use Plone."), i18n_domain='ploneservicescenter', ), relationship='providerToSiteUsingPlone', allowed_types=('Provider',), vocabulary_display_path_bound=-1, vocabulary="getProvidersReferences", multiValued=True, ), )) class SiteUsingPlone(Services.BaseServicesContent): """Site using Plone.
from AccessControl import getSecurityManager from Products.Archetypes import atapi from Products.ATContentTypes.content import base from Products.ArchAddOn import public from Products.PloneServicesCenter import PSCMessageFactory as _ from Products.PloneServicesCenter.validators import IndustriesValidator from Products.PloneServicesCenter.content import country servicesSchema = atapi.BaseSchema + atapi.Schema(( atapi.StringField( 'description', accessor='Description', widget=atapi.TextAreaWidget( label=_(u"label_psc_description", default=u"Description"), description=_(u"help_psc_description", default=u""), i18n_domain='ploneservicescenter', ), required=1, searchable=1, ), atapi.StringField( 'country', vocabulary=country.vocab, validateVocabulary=True, countries=country.countries, widget=atapi.SelectionWidget( label=_(u"label_psc_country_cat", default=u"Country"), description=_(u"help_services_country", default=u"Select a country"),
def __call__(self, value, *args, **kwargs): if len([v for v in value if v]) > 2: return _(u'Please select at most two industries') return True
from zope.interface import implements from Products.Archetypes import atapi from Products.PloneServicesCenter import PSCMessageFactory as _ from Products.PloneServicesCenter.interfaces import IBuzz from Products.PloneServicesCenter.content import Services schema = Services.servicesSchema + atapi.Schema(( atapi.TextField( 'body', widget=atapi.RichWidget( label=_(u"label_psc_detailed_info", default=u"Detailed information"), description=_( u"help_buzz_body", default=u"Enter the details description about this buzz."), i18n_domain='ploneservicescenter', ), allowable_content_types=('text/html', ), default_content_type='text/html', default_output_type='text/html', required=0, searchable=1, ), atapi.ImageField( 'logo', widget=atapi.ImageWidget( label=_(u"label_general_logo", default=u"Logo"), description=_( u"help_buzz_logo",
from Products.ATContentTypes.content import base from Products.ArchAddOn import public from Products.Archetypes import atapi from Products.PloneServicesCenter import PSCMessageFactory as _ from Products.PloneServicesCenter.content import country from Products.PloneServicesCenter.validators import IndustriesValidator servicesSchema = atapi.BaseSchema + atapi.Schema(( atapi.StringField( 'description', accessor='Description', widget=atapi.TextAreaWidget( label=_(u'label_psc_description', default=u'Description'), description=_(u'help_psc_description', default=u''), i18n_domain='ploneservicescenter', ), required=1, searchable=1, ), atapi.StringField( 'country', vocabulary=country.vocab, validateVocabulary=True, countries=country.countries, widget=atapi.SelectionWidget( label=_(u'label_psc_country_cat', default=u'Country'), description=_(u'help_services_country', default=u'Select a country'),
from AccessControl import getSecurityManager from Products.Archetypes import atapi from Products.ATContentTypes.content import base from Products.ArchAddOn import public from Products.PloneServicesCenter import PSCMessageFactory as _ from Products.PloneServicesCenter.validators import IndustriesValidator from Products.PloneServicesCenter.content import country servicesSchema = atapi.BaseSchema + atapi.Schema(( atapi.StringField('description', accessor='Description', widget=atapi.TextAreaWidget( label=_(u"label_psc_description", default=u"Description"), description=_(u"help_psc_description", default=u""), i18n_domain='ploneservicescenter', ), required=1, searchable=1, ), atapi.StringField('country', vocabulary=country.vocab, validateVocabulary=True, countries=country.countries, widget=atapi.SelectionWidget( label=_(u"label_psc_country_cat", default=u"Country"), description=_(u"help_services_country", default=u"Select a country"), i18n_domain='ploneservicescenter',
from Products.Archetypes import atapi from zope.interface import implements from Products.PloneServicesCenter import PSCMessageFactory as _ from Products.PloneServicesCenter.interfaces import IProvider from Products.PloneServicesCenter.content import Services schema = Services.servicesSchema.copy() + atapi.Schema( ( atapi.BooleanField( "goodCompany", write_permission="Manage portal", read_permission="Manage portal", widget=atapi.BooleanWidget( label=_(u"label_provider_goodcompany", default=u"Good Company?"), description=_( u"help_provider_goodcompany", default=u"Check if this flag if the company is considered to be a good-behaving, ethical company.", ), i18n_domain="ploneservicescenter", ), ), atapi.ImageField( "logo", max_size=(150, 75), widget=atapi.ImageWidget( label=_(u"label_psc_logo", default=u"Logo"), description=_( u"help_provider_logo", default=u"Add a logo for the project (or organization/company) by clicking the 'Browse' button. Max 150x75 pixels (will be resized if bigger).",
# -*- coding: utf-8 -*- from Products.Archetypes import atapi from Products.PloneServicesCenter import PSCMessageFactory as _ from Products.PloneServicesCenter.content import Services from Products.PloneServicesCenter.interfaces import IBuzz from zope.interface import implements schema = Services.servicesSchema + atapi.Schema(( atapi.TextField( 'body', widget=atapi.RichWidget( label=_(u'label_psc_detailed_info', default=u'Detailed information'), description=_(u'help_buzz_body', default=u'Enter the details description about this buzz.'), i18n_domain='ploneservicescenter', ), allowable_content_types=('text/html',), default_content_type='text/html', default_output_type='text/html', required=0, searchable=1, ), atapi.ImageField( 'logo', widget=atapi.ImageWidget( label=_(u'label_general_logo', default=u'Logo'), description=_(u'help_buzz_logo', default=u'Add a logo for the case study (normally the customer logo). Max 150x75 pixels (will be resized if bigger).'), i18n_domain='ploneservicescenter',
from zope.interface import implements from Products.Archetypes import atapi from Products.PloneServicesCenter import PSCMessageFactory as _ from Products.PloneServicesCenter.interfaces import IBuzz from Products.PloneServicesCenter.content import Services schema = Services.servicesSchema + atapi.Schema(( atapi.TextField('body', widget=atapi.RichWidget( label=_(u"label_psc_detailed_info", default=u"Detailed information"), description=_(u"help_buzz_body", default=u"Enter the details description about this buzz."), i18n_domain='ploneservicescenter', ), allowable_content_types=('text/html',), default_content_type='text/html', default_output_type='text/html', required=0, searchable=1, ), atapi.ImageField('logo', widget=atapi.ImageWidget( label=_(u"label_general_logo", default=u"Logo"), description=_(u"help_buzz_logo", default=u"Add a logo for the case study (normally the customer logo). Max 150x75 pixels (will be resized if bigger)."), i18n_domain='ploneservicescenter', ), sizes={'large': (768, 768),
from AccessControl import getSecurityManager from zope.interface import implements from Products.Archetypes import atapi from Products.PloneServicesCenter import PSCMessageFactory as _ from Products.PloneServicesCenter.interfaces import ISiteUsingPlone from Products.PloneServicesCenter.content import Services schema = Services.servicesSchema + atapi.Schema((atapi.ReferenceField( 'provider', widget=atapi.ReferenceWidget( checkbox_bound=0, label=_(u"label_psc_provider_cat", default=u"Provider"), description=_( u"help_siteuseplone_provider", default= u"Select provider(s) from the below listing for the Site that Use Plone." ), i18n_domain='ploneservicescenter', ), relationship='providerToSiteUsingPlone', allowed_types=('Provider', ), vocabulary_display_path_bound=-1, vocabulary="getProvidersReferences", multiValued=True, ), )) class SiteUsingPlone(Services.BaseServicesContent):
from Products.PloneServicesCenter import PSCMessageFactory as _ # BBB pake the ATCountry widget unpickleable import Products.Archetypes import sys sys.modules['Products.ATCountryWidget'] = Products.Archetypes sys.modules['Products.ATCountryWidget.Widget'] = Widget Widget.CountryWidget = Widget.SelectionWidget module = 'Products.PloneServicesCenter.content.country' allow_module(module) countries = { _(u'Europe (Western)'): atapi.DisplayList([ ('ad', _(u'Andorra')), ('at', _(u'Austria')), ('be', _(u'Belgium')), ('dk', _(u'Denmark')), ('fo', _(u'Faroe Islands')), ('fi', _(u'Finland')), ('fr', _(u'France')), ('de', _(u'Germany')), ('gi', _(u'Gibraltar')), ('gl', _(u'Greenland')), ('is', _(u'Iceland')), ('ie', _(u'Ireland')), ('it', _(u'Italy')), ('li', _(u'Liechtenstein')), ('lu', _(u'Luxembourg')),
from Products.PloneServicesCenter import PSCMessageFactory as _ # BBB pake the ATCountry widget unpickleable import sys import Products.Archetypes from Products.Archetypes import Widget sys.modules['Products.ATCountryWidget'] = Products.Archetypes sys.modules['Products.ATCountryWidget.Widget'] = Widget Widget.CountryWidget = Widget.SelectionWidget module = "Products.PloneServicesCenter.content.country" allow_module(module) countries = { _(u"Europe (Western)"): atapi.DisplayList([ ("ad", _(u"Andorra")), ("at", _(u"Austria")), ("be", _(u"Belgium")), ("dk", _(u"Denmark")), ("fo", _(u"Faroe Islands")), ("fi", _(u"Finland")), ("fr", _(u"France")), ("de", _(u"Germany")), ("gi", _(u"Gibraltar")), ("gl", _(u"Greenland")), ("is", _(u"Iceland")), ("ie", _(u"Ireland")), ("it", _(u"Italy")), ("li", _(u"Liechtenstein")),
from Products.PloneServicesCenter import PSCMessageFactory as _ # BBB pake the ATCountry widget unpickleable import sys import Products.Archetypes from Products.Archetypes import Widget sys.modules['Products.ATCountryWidget'] = Products.Archetypes sys.modules['Products.ATCountryWidget.Widget'] = Widget Widget.CountryWidget = Widget.SelectionWidget module = "Products.PloneServicesCenter.content.country" allow_module(module) countries = { _(u"Europe (Western)"): atapi.DisplayList([ ("ad", _(u"Andorra")), ("at", _(u"Austria")), ("be", _(u"Belgium")), ("dk", _(u"Denmark")), ("fo", _(u"Faroe Islands")), ("fi", _(u"Finland")), ("fr", _(u"France")), ("de", _(u"Germany")), ("gi", _(u"Gibraltar")), ("gl", _(u"Greenland")), ("is", _(u"Iceland")), ("ie", _(u"Ireland")), ("it", _(u"Italy")), ("li", _(u"Liechtenstein")), ("lu", _(u"Luxembourg")),
from Products.CMFCore.utils import getToolByName from Products.Archetypes import atapi from zope.interface import implements from Products.PloneServicesCenter import PSCMessageFactory as _ from Products.PloneServicesCenter.interfaces import IProvider from Products.PloneServicesCenter.content import Services schema = Services.servicesSchema.copy() + atapi.Schema(( atapi.BooleanField( 'goodCompany', write_permission='Manage portal', read_permission='Manage portal', widget=atapi.BooleanWidget( label=_(u"label_provider_goodcompany", default=u"Good Company?"), description=_( u"help_provider_goodcompany", default= u"Check if this flag if the company is considered to be a good-behaving, ethical company." ), i18n_domain='ploneservicescenter', ), ), atapi.ImageField( 'logo', max_size=(150, 75), widget=atapi.ImageWidget( label=_(u"label_psc_logo", default=u"Logo"), description=_( u"help_provider_logo",