Exemplo n.º 1
0
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', ''), )
Exemplo n.º 2
0
class IAdLink(Interface):

    title = schema.TextLine(
        title=_(u"Title"),
        required=True,
    )

    url = schema.URI(
        title=_(u"URL"),
        required=True,
    )
Exemplo n.º 3
0
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,
    )
Exemplo n.º 4
0
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,
    )
Exemplo n.º 5
0
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,
    )
Exemplo n.º 6
0
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,
    )
Exemplo n.º 7
0
class EditForm(base.EditForm):
    schema = IAdLink
    label = _(u"Edit AdLink Portlet")
    description = _(u"This portlet rendering AdLink.")
Exemplo n.º 8
0
 def title(self):
     return _(u"AdLink")
Exemplo n.º 9
0
class IAdLink(IPortletDataProvider):

    text = schema.TextLine(
        title=_(u"Text"),
        required=True,
    )