Exemplo n.º 1
0
class IEmailTemplate(form.Schema, IImageScaleTraversable):
    """
    Email Template
    """
    email_subject = schema.TextLine(
        title=_(u"Email Subject"),
        required=True,
    )

    send_to = schema.TextLine(
        title=_(u"Send To"),
        required=True,
    )

    send_from = schema.TextLine(
        title=_(u"Send From"),
        required=True,
    )

    email_body = schema.Text(
        title=_(u"Body"),
        required=True,
    )

    email_footer = schema.Text(
        title=_(u"Footer/Signature"),
        required=True,
    )

    pass
Exemplo n.º 2
0
class ITopic(form.Schema, IImageScaleTraversable):
    """
    Topic
    """

    # topic_id = schema.TextLine(
    #        title=_(u"ID"),
    #        required=True,
    #     )

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

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

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

    officer_email = schema.TextLine(
        title=_(u"Officer Email"),
        required=True,
        constraint=validateaddress,
    )

    pass
Exemplo n.º 3
0
class IQuestion(form.Schema, IImageScaleTraversable):
    """
    Question
    """
    # topic = schema.TextLine(
    #        title=_(u"Topic"),
    #        required=True,
    #     )
    # topic = schema.Choice(title = u"Topic",source=topics(), required=True)

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

    dexteritytextindexer.searchable('question_details')
    form.widget(question_details=WysiwygFieldWidget)
    question_details = schema.Text(
        title=u"Question Details",
        required=False,
    )

    form.mode(IEditForm, topic='display')
    form.widget(topic=RadioFieldWidget)
    topic = schema.List(title=u'Topic',
                        required=False,
                        value_type=schema.Choice(source=topics()))

    dexteritytextindexer.searchable('question_creator')
    form.mode(question_creator='hidden')
    question_creator = schema.TextLine(
        title=_(u"Question Creator"),
        required=False,
    )

    dexteritytextindexer.searchable('topic_officer')
    form.mode(topic_officer='hidden')
    topic_officer = schema.TextLine(
        title=_(u"Topic Creator"),
        required=False,
    )

    dexteritytextindexer.searchable('topics_str')
    form.mode(topics_str='hidden')
    topics_str = schema.TextLine(
        title=_(u"Topics"),
        required=False,
    )
    pass
Exemplo n.º 4
0
class IQAFacility(form.Schema, IImageScaleTraversable):
    """
    QA Facility
    """
    form.widget(facility_body=WysiwygFieldWidget)
    facility_body = schema.Text(
        title=_(u"Body"),
        required=False,
    )

    pass
Exemplo n.º 5
0
class ITopic(form.Schema, IImageScaleTraversable):
    """
    Topic
    """

    # topic_id = schema.TextLine(
    #        title=_(u"ID"),
    #        required=True,
    #     )

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

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

    officer = schema.Choice(
            source=users(),
            title=u'officer',
            required=False,
        )
        


    # officer = schema.TextLine(
    #        title=_(u"Officer"),
    #        required=True,
    #     )

    # officer_email = schema.TextLine(
    #        title=_(u"Officer Email"),
    #        required=True,
    #        constraint=validateaddress,
    #     )

    pass
Exemplo n.º 6
0
class IAnswer(form.Schema, IImageScaleTraversable):
    """
    Answer
    """

    dexteritytextindexer.searchable('answer')
    form.widget(answer=WysiwygFieldWidget)
    answer = schema.Text(title=u"Answer")

    dexteritytextindexer.searchable('question_creator')
    form.mode(question_creator='hidden')
    question_creator = schema.TextLine(
        title=_(u"Question Creator"),
        required=False,
    )

    dexteritytextindexer.searchable('answer_creator')
    form.mode(answer_creator='hidden')
    answer_creator = schema.TextLine(
        title=_(u"Answer Creator"),
        required=False,
    )

    pass
Exemplo n.º 7
0
from collective.grok import gs
from ilo.qa import MessageFactory as _


@gs.importstep(name=u'ilo.qa',
               title=_('ilo.qa import handler'),
               description=_(''))
def setupVarious(context):
    if context.readDataFile('ilo.qa.marker.txt') is None:
        return
    portal = context.getSite()

    # do anything here
Exemplo n.º 8
0
from collective.grok import gs
from ilo.qa import MessageFactory as _

@gs.importstep(
    name=u'ilo.qa', 
    title=_('ilo.qa import handler'),
    description=_(''))
def setupVarious(context):
    if context.readDataFile('ilo.qa.marker.txt') is None:
        return
    portal = context.getSite()

    # do anything here