本文整理汇总了Python中plone.fieldsets.fieldsets.FormFieldsets.id方法的典型用法代码示例。如果您正苦于以下问题:Python FormFieldsets.id方法的具体用法?Python FormFieldsets.id怎么用?Python FormFieldsets.id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类plone.fieldsets.fieldsets.FormFieldsets
的用法示例。
在下文中一共展示了FormFieldsets.id方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: UIControlPanelAdapter
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import id [as 别名]
class UIControlPanelAdapter(SchemaAdapterBase):
""" Adapter for the interface schema fields """
adapts(IPloneSiteRoot)
implements(IUITool)
def __init__(self, context):
super(UIControlPanelAdapter, self).__init__(context)
self.portal = context
ui_tool = getToolByName(self.portal, 'portal_ui_tool')
self.context = ui_tool
theme = FormFieldsets(IUIToolTheme)
theme.id = 'theme'
theme.label = _(u"Existing themes")
theme.description = _(u'Please select a theme from the existing ones.')
themeroller = FormFieldsets(IUIToolThemeroller)
themeroller.id = 'themeroller'
themeroller.label = _('Add theme')
class ThemeDisplayWidget(DisplayWidget):
""" Display the create directory link """
def __call__(self):
tool = self.context.context
tool._rebuildThemeHashes()
示例2: BaseControlPanelAdapter
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import id [as 别名]
class BaseControlPanelAdapter(SchemaAdapterBase):
""" Base control panel adapter """
def __init__(self, context):
super(BaseControlPanelAdapter, self).__init__(context)
portal_properties = getToolByName(context, 'portal_properties')
self.context = portal_properties.tlspu_cookiepolicy_properties
class CookiePolicyControlPanelAdapter(BaseControlPanelAdapter):
""" Cookie Policy control panel adapter """
adapts(IPloneSiteRoot)
implements(ICookiePolicySchema)
TCP_enabled = ProxyFieldProperty(ICookiePolicySchema['TCP_enabled'])
TCP_title = ProxyFieldProperty(ICookiePolicySchema['TCP_title'])
TCP_message = ProxyFieldProperty(ICookiePolicySchema['TCP_message'])
baseset = FormFieldsets(ICookiePolicySchema)
baseset.id = 'cookiepolicy'
baseset.label = _(u'Cookie Policy')
class CookiePolicyControlPanel(ControlPanelForm):
""" """
form_fields = FormFieldsets(baseset)
label = _('Cookie Policy settings')
description = _('Configure settings for Cookie Policy.')
form_name = _('Cookie Policy')
示例3: _toFieldValue
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import id [as 别名]
def _toFieldValue(self, input):
if input == self._missing:
return self.context._type()
else:
return self.context._type(filter(None, self.splitter.split(input)))
def _toFormValue(self, value):
if value == self.context.missing_value or value == self.context._type():
return self._missing
else:
return u'\r\n'.join(list(value))
# Fieldset configurations
baseset = FormFieldsets(ISEOConfigletBaseSchema)
baseset.id = 'seobase'
baseset.label = _(u'label_seobase', default=u'Base')
advancedset = FormFieldsets(ISEOConfigletAdvancedSchema)
advancedset.id = 'seoadvanced'
advancedset.label = _(u'label_seoadvanced', default=u'Advanced')
class SEOConfiglet(ControlPanelForm):
form_fields = FormFieldsets(baseset, advancedset)
form_fields['default_custom_metatags'].custom_widget = Text2ListWidget
form_fields['metatags_order'].custom_widget = Text2ListWidget
form_fields['types_seo_enabled'].custom_widget = MultiCheckBoxThreeColumnWidget
form_fields['types_seo_enabled'].custom_widget.cssClass='label'
form_fields['fields'].custom_widget = Text2ListWidget
示例4: property
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import id [as 别名]
strippeddict = {}
for ta in value:
strippeddict[ta.tags] = ta.attributes
tags = ta.tags.replace(',', ' ').split()
attributes = ta.attributes.replace(',', ' ').split()
stripped.append((tags,attributes))
self._settransform(stripped_combinations = strippeddict)
# Set kupu attribute for backwards compatibility
if self.kupu_tool is not None:
self.kupu_tool.set_stripped_combinations(stripped)
return property(get, set)
filtertagset = FormFieldsets(IFilterTagsSchema)
filtertagset.id = 'filtertags'
filtertagset.label = _(u'label_filtertags', default=u'Tags')
filterattributes = FormFieldsets(IFilterAttributesSchema)
filterattributes.id = 'filterattributes'
filterattributes.label = _(u'label_filterattributes', default=u'Attributes')
filtereditor = FormFieldsets(IFilterEditorSchema)
filtereditor.id = 'filtereditor'
filtereditor.label = _(u'filterstyles', default=u'Styles')
tagattr_widget = CustomWidgetFactory(ObjectWidget, TagAttrPair)
combination_widget = CustomWidgetFactory(ListSequenceWidget,
subwidget=tagattr_widget)
class FilterControlPanel(ControlPanelForm):
示例5: ProxyFieldProperty
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import id [as 别名]
masterdoctorado = ProxyFieldProperty(IgenWebControlPanel['masterdoctorado'])
ambitdoctorat_ca = ProxyFieldProperty(IgenWebControlPanel['ambitdoctorat_ca'])
ambitdoctorat_es = ProxyFieldProperty(IgenWebControlPanel['ambitdoctorat_es'])
ambitdoctorat_en = ProxyFieldProperty(IgenWebControlPanel['ambitdoctorat_en'])
# @apply
# def columna1():
# def get(self):
# return getGWConfig().columna1
# def set(self, value):
# getGWConfig().columna1 = value
# return property(get, set)
#
general = FormFieldsets(ISkinsSchema['theme'], IgenWebControlPanelSchemaGeneral)
general.id = 'genWebControlPanelgeneral'
general.label = _(u'label_gwcp_general', default=u'General')
general['theme'].custom_widget = DropdownChoiceWidget
especifics = FormFieldsets(IgenWebControlPanelSchemaEspecifics)
especifics.id = 'genWebControlPanelespecifics'
especifics.label = _(u'label_gwcp_especifics', default=u'Especific')
informacio = FormFieldsets(IgenWebControlPanelSchemaInformacio)
informacio.id = 'genWebControlPanelinformacio'
informacio.label = _(u'label_gwcp_informacio', default=u'Informacio')
sabors = FormFieldsets(IgenWebControlPanelSchemaSabors)
sabors.id = 'genWebControlPanelsabors'
sabors.label = _(u'label_gwcp_sabors', default=u'Sabors')
sabors['tipusintranet'].custom_widget = DropdownChoiceWidget
示例6: RichFileStreamingControlPanelAdapter
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import id [as 别名]
class RichFileStreamingControlPanelAdapter(SchemaAdapterBase):
adapts(IPloneSiteRoot)
implements(IRichFileStreamingSchema)
rf_streaming_collapsed = ProxyFieldProperty(IRichFileStreamingSchema['rf_streaming_collapsed'])
rfs_autoplay = ProxyFieldProperty(IRichFileStreamingSchema['rfs_autoplay'])
rfs_host = ProxyFieldProperty(IRichFileStreamingSchema['rfs_host'])
rfs_port = ProxyFieldProperty(IRichFileStreamingSchema['rfs_port'])
rfs_callback_netloc = ProxyFieldProperty(IRichFileStreamingSchema['rfs_callback_netloc'])
rfs_user = ProxyFieldProperty(IRichFileStreamingSchema['rfs_user'])
rfs_pass = ProxyFieldProperty(IRichFileStreamingSchema['rfs_pass'])
rfs_mainset = FormFieldsets(IRFStreamingMainSchema)
rfs_mainset.id = 'main'
rfs_mainset.label = _(u'label_rfs_main', default=u'Main')
rfs_convertdaemonset = FormFieldsets(IRFStreamingConvertDaemonSchema)
rfs_convertdaemonset.id = 'convertdaemon'
rfs_convertdaemonset.label = _(u'label_rfs_convertdaemon', default=u'ConvertDaemon')
class RichFileStreamingControlPanel(RFControlPanel):
"""
"""
template = ZopeTwoPageTemplateFile('controlpanel.pt')
form_fields = FormFieldsets(rfs_mainset, rfs_convertdaemonset)
label = _("RichFileStreaming settings")
description = _("RichFileStreaming settings for this site.")
form_name = _("RichFileStreaming settings")
示例7: IMailServicesFormSchema
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import id [as 别名]
required=True)
body = schema.SourceText(title=_(u"label_message",
default=u"Body"),
description=_(u"help_message",
default=u"The body of your email."),
required=True)
class IMailServicesFormSchema(IMailServicesGroupsUsersSchema,
IMailServicesAdditionalsSchema,
IMailServicesMailSchema):
""" Define the fields of the form
"""
ms_groupsusersset = FormFieldsets(IMailServicesGroupsUsersSchema)
ms_groupsusersset.id = 'groupsusers'
ms_groupsusersset.label = _(u"Groups & Users")
ms_additionalsset = FormFieldsets(IMailServicesAdditionalsSchema)
ms_additionalsset.id = 'additionals'
ms_additionalsset.label = _(u"Additionals mails")
ms_mailset = FormFieldsets(IMailServicesMailSchema)
ms_mailset.id = 'mail'
ms_mailset.label = _(u"Write the mail")
class MailServicesForm(MailServicesView, FieldsetsInputForm):
"""
"""
form_name = _(u"Mail Services")
示例8: sorted
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import id [as 别名]
for url in bundle.urls():
styles.append("%s [%s]" % (url, bundle.extra_data.get("media", None)))
return sorted(styles)
@property
def js(self):
scripts = []
for name, bundle in self.env._named_bundles.iteritems():
if not name.startswith("js-"):
continue
scripts.extend(bundle.urls())
return sorted(scripts)
assetsschema = FormFieldsets(IAssetsCPConfigSchema)
assetsschema.id = "assetsconfig"
assetsschema.label = _(u"label_assetsconfig", default=u"Configuration")
assetsoverview = FormFieldsets(IAssetsCPOverviewSchema)
assetsoverview.id = "assetsoverview"
assetsoverview.label = _(u"label_assetsoverview", default=u"Overview")
class AssetsControlPanel(ControlPanelForm):
form_fields = FormFieldsets(assetsschema, assetsoverview)
label = _("label_assets_settings", default="Assets settings")
description = _("help_assets_settings", default="Settings to enable and configure web assets.")
form_name = _("label_assets_settings", default="Assets settings")
示例9: get_cse_label
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import id [as 别名]
def get_cse_label(self):
return self.settings.cse_label
def set_cse_label(self, value):
self.settings.cse_label = value
cse_label = property(get_cse_label, set_cse_label)
@property
def settings(self):
site = getSite()
ann = IAnnotations(site)
return ann.setdefault(SETTING_KEY, Settings())
urlset = FormFieldsets(IURLSchema)
urlset.id = 'urls'
urlset.label = _(u'URLs')
urlset.description = _(u"This list holds all URLs that are associated with "
"a Provider. You cannot add URLs to this list here - "
"instead go directly to the desired Provider. There you "
"will find an option to add the Provider's URL")
manual_urlset = FormFieldsets(IManualURLsSchema)
manual_urlset.id = 'manual_urls'
manual_urlset.label = _(u'Manual URLs')
manual_urlset.description = _(u'URLs entered here that are already linked with'
' a Provider will be ignored.')
cseset = FormFieldsets(ICSESchema)
cseset.id = 'cse'
cseset.label = _(u'CSE')
示例10: property
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import id [as 别名]
for ta in value:
strippeddict[ta.tags] = ta.attributes
tags = ta.tags.replace(",", " ").split()
attributes = ta.attributes.replace(",", " ").split()
stripped.append((tags, attributes))
self._settransform(stripped_combinations=strippeddict)
# Set kupu attribute for backwards compatibility
if self.kupu_tool is not None:
self.kupu_tool.set_stripped_combinations(stripped)
return property(get, set)
filtertagset = FormFieldsets(IFilterTagsSchema)
filtertagset.id = "filtertags"
filtertagset.label = _(u"label_filtertags", default=u"Tags")
filterattributes = FormFieldsets(IFilterAttributesSchema)
filterattributes.id = "filterattributes"
filterattributes.label = _(u"label_filterattributes", default=u"Attributes")
filtereditor = FormFieldsets(IFilterEditorSchema)
filtereditor.id = "filtereditor"
filtereditor.label = _(u"filterstyles", default=u"Styles")
tagattr_widget = CustomWidgetFactory(ObjectWidget, TagAttrPair)
combination_widget = CustomWidgetFactory(ListSequenceWidget, subwidget=tagattr_widget)
class FilterControlPanel(ControlPanelForm):
示例11: property
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import id [as 别名]
show_atoz_link = property(get_show_atoz_link, set_show_atoz_link)
def get_show_previous_events(self):
return self.settings.show_previous_events
def set_show_previous_events(self, value):
self.settings.show_previous_events = value
show_previous_events = property(get_show_previous_events, set_show_previous_events)
@property
def settings(self):
ann = IAnnotations(self.context)
return ann.setdefault(SETTING_KEY, Settings())
logoset = FormFieldsets(ILogoSchema)
logoset.id = 'logo'
logoset.label = _(u'Logo')
emailset = FormFieldsets(IEmailSchema)
emailset.id = 'email'
emailset.label = _(u'Email')
sloganset = FormFieldsets(ISloganSchema)
sloganset.id = 'slogan'
sloganset.label = _(u'Slogan')
parametersset = FormFieldsets(IParametersSchema)
parametersset.id = 'parameters'
parametersset.label = _(u'Parameters')
示例12: sorted
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import id [as 别名]
styles.append('%s [%s]' % (
url, bundle.extra.get('media', None)))
return sorted(styles)
@property
def js(self):
scripts = []
for name, bundle in self.env._named_bundles.iteritems():
if not name.startswith('js-'):
continue
scripts.extend(bundle.urls())
return sorted(scripts)
assetsschema = FormFieldsets(IAssetsCPConfigSchema)
assetsschema.id = 'assetsconfig'
assetsschema.label = _(u'label_assetsconfig', default=u'Configuration')
assetsoverview = FormFieldsets(IAssetsCPOverviewSchema)
assetsoverview.id = 'assetsoverview'
assetsoverview.label = _(u'label_assetsoverview', default=u'Overview')
class AssetsControlPanel(ControlPanelForm):
form_fields = FormFieldsets(assetsschema, assetsoverview)
label = _('label_assets_settings', default='Assets settings')
description = _('help_assets_settings',
default='Settings to enable and configure web assets.')
form_name = _('label_assets_settings', default='Assets settings')
示例13: FormFieldsets
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import id [as 别名]
# -*- coding:utf-8 -*-
from collective.quickupload.browser import quickupload_settings
from collective.zipfiletransport.browser import zipfiletransportprefs
from plone.app.controlpanel.form import ControlPanelForm
from plone.fieldsets.fieldsets import FormFieldsets
from Products.CMFCore.utils import getToolByName
from Products.CMFDefault.formlib.schema import ProxyFieldProperty
from Products.CMFDefault.formlib.schema import SchemaAdapterBase
from Products.CMFPlone.interfaces import IPloneSiteRoot
from sc.base.uploader import MessageFactory as _
from zope import schema
from zope.component import adapts
from zope.interface import Interface, implements
quickset = FormFieldsets(quickupload_settings.IQuickUploadControlPanel)
quickset.id = "quickupload"
quickset.label = _(u"Quick Upload settings")
zipset = FormFieldsets(zipfiletransportprefs.IZipFileTransportPrefsForm)
zipset.id = "ziptransport"
zipset.label = _(u"ZipFileTransport Settings Form")
EXPORTER_DESC = _(u"Should exporting contents from a folder be enabled " u"for anonymous users?")
class IExporterPrefsForm(Interface):
""" A configlet for exporting content. """
enable_export = schema.Bool(
title=_(u"Enable anonymous export"), description=EXPORTER_DESC, default=False, required=False
)
示例14: settings
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import id [as 别名]
@property
def settings(self):
site = getSite()
if not IPloneSiteRoot.providedBy(site):
# here be dirty hack
dummy = Settings()
dummy.stored_list = self.stored_list
dummy.linked_list = self.linked_list
dummy.additionals_list = self.additionals_list
return dummy
ann = IAnnotations(site)
return ann.setdefault(SETTING_KEY, Settings())
stored_set = FormFieldsets(IStoredCSESchema)
stored_set.id = 'stored'
stored_set.label = _(u'Stored CSE')
linked_set = FormFieldsets(ILinkedCSESchema)
linked_set.id = 'linked'
linked_set.label = _(u'Linked CSE')
additional_set = FormFieldsets(IAdditionalParametersSchema)
additional_set.id = 'additional'
additional_set.label = 'Additional parameters'
stored_settings_widget = CustomWidgetFactory(ObjectWidget, StoredCSETuple)
stored_widget = CustomWidgetFactory(ListSequenceWidget,
subwidget=stored_settings_widget)
linked_settings_widget = CustomWidgetFactory(ObjectWidget, LinkedCSETuple)
示例15: set_password
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import id [as 别名]
def set_password(self, value):
self.context._updateProperty('password', value)
password = property(get_password, set_password)
def get_backends(self):
return self.context.backends
def set_backends(self, value):
self.context._updateProperty('backends', value)
backends = property(get_backends, set_backends)
spooler_set = FormFieldsets(IECAABControlPanelSpoolerSchema)
spooler_set.id = 'ecaab_settings_spooler'
spooler_set.label = _(u"legend_ecspooler_details", default=u"Spooler connection settings")
backends_set = FormFieldsets(IECAABControlPanelBackendsSchema)
backends_set.id = 'ecaab_settings_backends'
backends_set.label = _(u"legend_backend_details", default=u"Available backends")
class ECAABControlPanel(ControlPanelForm):
"""
"""
form_fields = FormFieldsets(spooler_set, backends_set)
label = _(u"heading_ecspooler_setup",
default=u"Auto Assessment Box Settings")