class AddForm(base.AddForm): schema = IAdLink label = _(u"Add AdLink Portlet") description = _(u"This portlet rendering AdLink.") def create(self, data): return Assignment(text=data.get('text', ''), )
class IAdLink(Interface): title = schema.TextLine( title=_(u"Title"), required=True, ) url = schema.URI( title=_(u"URL"), required=True, )
class IProfile(Interface): title = schema.TextLine( title=_(u"Title"), required=True, ) jobTitle = schema.TextLine( title=_(u"Job Title"), required=True, ) image = NamedBlobImage( title=_(u"Profile Image"), required=False, )
class IOutsideNotice(model.Schema): """ Add outside notice for News Item Note: Add inside notice option """ inside_notice = schema.Bool( title=_(u"Inside Notice"), default=True, required=False, ) outside_notice = schema.Bool( title=_(u"Outside Notice"), default=False, required=False, )
class ITagMembers(model.Schema): """Add tag members to content """ directives.fieldset( 'Members', label=_(u'Members'), fields=('tags', ), ) tags = RelationList( title=_(u"Tag Members"), value_type=RelationChoice( title=_(u"Related"), source=CatalogSource(portal_type='Profile'), ), required=False, )
class ICover(Interface): title = schema.TextLine( title=_(u"Title"), required=True, ) description = schema.Text( title=_(u"Description"), required=False, ) heroURL = schema.List( title=_(u"Hero URL"), value_type=schema.TextLine(title=_(u"Hero URL")), required=False, ) footerVideo = schema.Text( title=_(u"Footer Video"), description=_(u"Youtube Video in Footer"), required=True, )
class EditForm(base.EditForm): schema = IAdLink label = _(u"Edit AdLink Portlet") description = _(u"This portlet rendering AdLink.")
def title(self): return _(u"AdLink")
class IAdLink(IPortletDataProvider): text = schema.TextLine( title=_(u"Text"), required=True, )