def name(self): return self.data.name or _(u"Subscribe to newsletter")
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')
def title(self): return _(u"NewsLetter")