本文整理汇总了Python中plone.fieldsets.fieldsets.FormFieldsets.label方法的典型用法代码示例。如果您正苦于以下问题:Python FormFieldsets.label方法的具体用法?Python FormFieldsets.label怎么用?Python FormFieldsets.label使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类plone.fieldsets.fieldsets.FormFieldsets
的用法示例。
在下文中一共展示了FormFieldsets.label方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: RichFileStreamingControlPanelAdapter
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import label [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")
plugin_iface = IStreamable
示例2: _toFormValue
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import label [as 别名]
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
form_fields['stop_words'].custom_widget = Text2ListWidget
示例3: property
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import label [as 别名]
self.context._updateProperty('major_attr', value)
major_attr = property(get_major_attr, set_major_attr)
def get_personal_title_attr(self):
return self.context.personal_title_attr
def set_personal_title_attr(self, value):
self.context._updateProperty('personal_title_attr', value)
personal_title_attr = property(get_personal_title_attr, set_personal_title_attr)
main_set = FormFieldsets(IECABControlPanelSchema)
main_set.id = 'ecab_settings_spooler'
main_set.label = _(u"legend_ecab_attr_mapping", default=u"Student attributes mapping")
main_set.description = _(u"help_ecab_attr_mapping",
default=u"Here you can specify user attributes which "
"should be used to retrieve additional student "
"information. The available user attributes are "
"listed in portal_memberdata in the "
"Zope Management Interface (ZMI).")
class ECABControlPanel(ControlPanelForm):
"""
"""
form_fields = FormFieldsets(main_set, )
label = _(u"heading_ecab_prefs",
default=u"Assignment Box Settings")
示例4: property
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import label [as 别名]
self.context._updateProperty('entities_greek', value)
entities_greek = property(get_entities_greek, set_entities_greek)
def get_entities_latin(self):
return self.context.entities_latin
def set_entities_latin(self, value):
self.context._updateProperty('entities_latin', value)
entities_latin = property(get_entities_latin, set_entities_latin)
basicset = FormFieldsets(ICKEditorBaseSchema)
basicset.id = 'cke_base'
basicset.label = _(u'Basic settings')
skinset = FormFieldsets(ICKEditorSkinSchema)
skinset.id = 'cke_skin'
skinset.label = _(u'Editor Skin')
browserset = FormFieldsets(ICKEditorBrowserSchema)
browserset.id = 'cke_browser'
browserset.label = _(u'Resources Browser')
advancedset = FormFieldsets(ICKEditorAdvancedSchema)
advancedset.id = 'cke_advanced'
advancedset.label = _(u'Advanced Configuration')
class CKEditorControlPanel(ControlPanelForm):
示例5: get_gpsor_discount_title
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import label [as 别名]
def get_gpsor_discount_title(self):
return self.gpsor_props.gpsor_discount_title
gpsor_discount_title = property(get_gpsor_discount_title, set_gpsor_discount_title)
def set_gpsor_discount_total(self, value):
self.gpsor_props.gpsor_discount_total = value
def get_gpsor_discount_total(self):
return self.gpsor_props.gpsor_discount_total
gpsor_discount_total = property(get_gpsor_discount_total, set_gpsor_discount_total)
fs_gpsortypes = FormFieldsets(IGetPaidSalesforceOrderRecorderTypes)
fs_gpsortypes.id = 'gpsortypes'
fs_gpsortypes.label = u'Types Settings'
class PHMultiCheckBoxWidget(MultiCheckBoxWidget):
def __init__(self, field, request):
"""Initialize the widget."""
super(MultiCheckBoxWidget, self).__init__(field,
field.value_type.vocabulary, request)
class GetPaidSalesforceOrderRecorderCP(ControlPanelForm):
form_fields = FormFieldsets(fs_gpsortypes)
# title of the page
label = "GetPaid Salesforce Order Recorder Settings"
示例6: wicked_settings
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import label [as 别名]
set_wiki_enabled_types)
@property
def wicked_settings(self):
ann = IAnnotations(self.context)
return ann.setdefault(WICKED_SETTING_KEY, WickedSettings())
def unregister_wicked_types(self):
"""Unregisters all previous registration objects
"""
for name in wicked_type_regs.keys():
wicked_type_regs[name](self.context).handle(unregister=True)
textset = FormFieldsets(ITextMarkupSchema)
textset.id = 'textmarkup'
textset.label = _(u'Text markup')
if HAS_WICKED:
wikiset = FormFieldsets(IWikiMarkupSchema)
wikiset.id = 'wiki'
wikiset.label = _(u'Wiki behavior')
class MarkupControlPanel(ControlPanelForm):
if HAS_WICKED:
form_fields = FormFieldsets(textset, wikiset)
form_fields['wiki_enabled_types'].custom_widget = MultiCheckBoxVocabularyWidget
else:
form_fields = FormFieldsets(textset)
form_fields['allowed_types'].custom_widget = AllowedTypesWidget
示例7: BaseControlPanelAdapter
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import label [as 别名]
default=False,
required=False
)
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.ploneslideshow_properties
class SlideShowControlPanelAdapter(BaseControlPanelAdapter):
""" control panel adapter """
adapts(IPloneSiteRoot)
implements(IProvidersSchema)
withcollection = ProxyFieldProperty(IProvidersSchema['withcollection'])
baseset = FormFieldsets(IProvidersSchema)
baseset.id = 'baseset'
baseset.label = _(u'SlideShow Configuration')
class ProvidersControlPanel(ControlPanelForm):
""" """
form_fields = FormFieldsets(baseset)
label = _('SlideShow Settings')
description = _('Configure settings for Products.PloneSlideShow.')
form_name = _('SlideShow Configuration')
示例8: set_show_original_on_translation
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import label [as 别名]
def set_show_original_on_translation(self, value):
prop = getToolByName(self.context, "portal_properties").linguaplone_properties
prop.hide_right_column_on_translate_form = value
def get_show_original_on_translation(self):
prop = getToolByName(self.context, "portal_properties").linguaplone_properties
return prop.hide_right_column_on_translate_form
available_languages = property(get_available_languages, set_available_languages)
show_original_on_translation = property(get_show_original_on_translation, set_show_original_on_translation)
selection = FormFieldsets(IMultiLanguageSelectionSchema)
selection.label = _(u"Options multilingual")
options = FormFieldsets(IMultiLanguageOptionsSchema)
options.label = _(u"Negotiation Scheme")
languages = FormFieldsets(IMultilinguaRootFolderForm)
languages.label = _(u"Default language URLs")
langattr_widget = CustomWidgetFactory(ObjectWidget, LangAttrPair)
combination_widget = CustomWidgetFactory(ListSequenceWidget, subwidget=langattr_widget)
class LanguageControlPanel(BasePanel):
"""A modified language control panel, allows selecting multiple languages.
"""
示例9: __init__
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import label [as 别名]
def __init__(self, context):
super(BaseControlPanelAdapter, self).__init__(context)
portal_properties = getToolByName(context, 'portal_properties')
self.context = portal_properties.sc_mailchimp_newsletters_properties
class MChimpControlPanelAdapter(BaseControlPanelAdapter):
""" control panel adapter """
adapts(IPloneSiteRoot)
implements(IProvidersSchema)
apikey = ProxyFieldProperty(IProvidersSchema['apikey'])
ssl_enabled = ProxyFieldProperty(IProvidersSchema['ssl_enabled'])
debugmode = ProxyFieldProperty(IProvidersSchema['debugmode'])
baseset = FormFieldsets(IProvidersSchema)
baseset.id = 'baseset'
baseset.label = _(u'MailChimp Configuration')
class ProvidersControlPanel(ControlPanelForm):
""" """
base_template = ControlPanelForm.template
template = ZopeTwoPageTemplateFile('templates/cpanel.pt')
form_fields = FormFieldsets(baseset)
label = _('MailChimp settings')
description = _('Configure settings for sc.mailchimp.newsletter.')
form_name = _('MailChimp Configuration')
示例10: property
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import label [as 别名]
tagger_type = property(get_tagger_type, set_tagger_type)
def set_brown_categories(self, value):
pass
def get_brown_categories(self):
npextractor = getUtility(ITermExtractor)
return npextractor.tagger_metadata.get("categories")
brown_categories = property(get_brown_categories, set_brown_categories)
classifierset = FormFieldsets(IClassifierSettingsSchema)
classifierset.id = "classifier"
classifierset.label = u"Classifier settings"
termextractorset = FormFieldsets(ITermExtractorSchema)
termextractorset.id = "termextractor"
termextractorset.label = u"Term Extraction settings"
class ClassifierSettings(ControlPanelForm):
"""
"""
form_fields = FormFieldsets(classifierset, termextractorset)
label = _("Classifier settings")
description = _("Settings for the content classifier.")
form_name = _("Classifier settings")
示例11: _toFormValue
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import label [as 别名]
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)
type_seo_enabled = MultiCheckBoxThreeColumnWidget
form_fields["default_custom_metatags"].custom_widget = Text2ListWidget
form_fields["metatags_order"].custom_widget = Text2ListWidget
form_fields["types_seo_enabled"].custom_widget = type_seo_enabled
form_fields["types_seo_enabled"].custom_widget.cssClass = "label"
示例12: ProxyFieldProperty
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import label [as 别名]
fb_enabled = ProxyFieldProperty(IFbSchema['fb_enabled'])
fbaction = ProxyFieldProperty(IFbSchema['fbaction'])
fbadmins = ProxyFieldProperty(IFbSchema['fbadmins'])
class GpControlPanelAdapter(BaseControlPanelAdapter):
""" Google+ control panel adapter """
adapts(IPloneSiteRoot)
implements(IGpSchema)
gp_enabled = ProxyFieldProperty(IGpSchema['gp_enabled'])
baseset = FormFieldsets(IProvidersSchema)
baseset.id = 'baseset'
baseset.label = _(u'Base Plugin Configuration')
twitterset = FormFieldsets(ITwitterSchema)
twitterset.id = 'twitterset'
twitterset.label = _(u'Twitter settings')
fbset = FormFieldsets(IFbSchema)
fbset.id = 'fbset'
fbset.label = _(u'Facebook settings')
gpset = FormFieldsets(IGpSchema)
gpset.id = 'gpset'
gpset.label = _(u'Google+ settings')
class ProvidersControlPanel(ControlPanelForm):
示例13: settings
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import label [as 别名]
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)
linked_widget = CustomWidgetFactory(ListSequenceWidget,
示例14: IMailServicesFormSchema
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import label [as 别名]
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")
label = _(u"Mail Services")
示例15: set_ph_field_description_4
# 需要导入模块: from plone.fieldsets.fieldsets import FormFieldsets [as 别名]
# 或者: from plone.fieldsets.fieldsets.FormFieldsets import label [as 别名]
def set_ph_field_description_4(self, value):
self.ph_props.manage_changeProperties(ph_field_description_4=value)
def get_ph_field_description_4(self):
return self.ph_props.ph_field_description_4
ph_field_description_4 = property(get_ph_field_description_4, set_ph_field_description_4)
class TinyTextAreaWidget(TextAreaWidget):
"""We don't need much for our descriptions"""
height=5
width=30
fs_phtypes = FormFieldsets(IPHTypes)
fs_phtypes.id = 'phtypes'
fs_phtypes.label = u'Basic Settings'
fs_phfield1 = FormFieldsets(IPHFieldOne)
fs_phfield1.id = 'phfield1'
fs_phfield1.label = u'Field 1'
fs_phfield2 = FormFieldsets(IPHFieldTwo)
fs_phfield2.id = 'phfield2'
fs_phfield2.label = u'Field 2'
fs_phfield3 = FormFieldsets(IPHFieldThree)
fs_phfield3.id = 'phfield3'
fs_phfield3.label = u'Field 3'
fs_phfield4 = FormFieldsets(IPHFieldFour)
fs_phfield4.id = 'phfield4'