Ejemplo n.º 1
0
class IEntrega(IBaseFormSchema):

    form.mode(protocolo_id='hidden')
    protocolo_id = schema.Int(
        title=_(u'ID do Protocolo'),
        description=_(u'Identificador do Protocolo.'),
        defaultFactory=getProtocoloId)

    form.mode(pessoa_id='hidden')
    pessoa_id = schema.Int(
        title=_(u'ID da Pessoa'),
        description=_(u'Identificador da Pessoa.'))
        
    tipoentrega_id = schema.Choice(
        title=_(u'Tipo de Entrega'),
        description=_(u'Selecione o tipo de entrega.'),
        vocabulary='il.spdo.tipoentrega-vocab')

    form.widget(data_entrega=DateFieldWidget)
    data_entrega = schema.Date(
        title=_(u'Data de Entrega'),
        description=_(u'Informe a data de entrega do protocolo expedido.'),
        defaultFactory=datetime.date.today,
        required=False)

    objeto_correios = schema.TextLine(
        title=_(u'Objeto dos Correios'),
        description=_(u'Informe o identificador do objeto dos correios, quando for o caso.'),
        max_length=20,
        required=False)
class IImportContactsSettings(form.Schema):
    """
    Uses IDublinCore
    """

    # csv_import_file = NamedBlobFile(
    #     title=_(u"CSV Import File"),
    #     description=_(u"Please attach the Member CSV File."),
    #     required=False)

    # overwrite_csv = schema.Bool(title=_(u"Overwrite Contacts"),
    #                             description=_(u"Toggling this on to overwrite conflicting accounts, otherwise "
    #                                           u"conflicting accounts will be created and logged instead of being"
    #                                           u"attached to a home."),
    #                             required=False,
    #                             default=False)

    form.mode(clear_report='hidden')
    clear_report = schema.Bool(
        title=_(u"Clear Report"),
        description=_(
            u"Check this and save to remove the existing report log."),
        required=False,
        default=False)

    form.mode(report_log='display')
    report_log = schema.List(title=_(u'Report Log'),
                             description=_(u''),
                             value_type=schema.TextLine(),
                             required=False,
                             defaultFactory=defaultList)
Ejemplo n.º 3
0
class IImprovementArea(form.Schema):
    """  Improvement Area type
    """
    form.mode(title='input')
    title = schema.Choice(
        title=_(u"Title"),
        source=utils.area_title,
        required=True,
    )

    form.mode(description='input')
    description = schema.Text(
        title=_(u'Description'),
        required=False,
        missing_value=u'',
    )

    image = namedfile.NamedBlobImage(
        title=_(u'Image'),
        description=_(u"Image used to describe the Area. If no file chosen, a defult one will be used."),
        required=False,
    )

    directives.mode(title_es='hidden')
    title_es = schema.TextLine(
        title=_(u"Title Spanish"),
        required=False,
    )

    directives.mode(title_fr='hidden')
    title_fr = schema.TextLine(
        title=_(u"Title French"),
        required=False,
    )
Ejemplo n.º 4
0
class IOGMail(form.Schema):
    """Opengever specific behavior,
    which add a title Field to the form.
    """

    form.fieldset(
        u'common',
        label=base_mf(u'fieldset_common', u'Common'),
        fields=[u'title', 'original_message', 'message_source'])

    form.order_before(title='message')
    dexteritytextindexer.searchable('title')
    title = schema.TextLine(
        title=dossier_mf(u'label_title', default=u'Title'),
        required=False,
    )

    form.mode(original_message=DISPLAY_MODE)
    form.read_permission(original_message='cmf.ManagePortal')
    form.write_permission(original_message='cmf.ManagePortal')
    original_message = field.NamedBlobFile(
        title=_(u'label_original_message',
                default=u'Raw *.msg message before conversion'),
        required=False,
    )

    form.mode(message_source=DISPLAY_MODE)
    form.read_permission(message_source='cmf.ManagePortal')
    form.write_permission(message_source='cmf.ManagePortal')
    message_source = schema.Choice(
        title=_('label_message_source',
                default='Message source'),
        vocabulary=get_message_source_vocabulary(),
        required=False,
    )
Ejemplo n.º 5
0
class IOldFields(model.Schema):
    """ Add Old Fields """
    #    form.mode(oldPicturePath='hidden')
    oldPicturePath = schema.TextLine(
        title=_(u"Old Picture Path"),
        required=False,
    )

    form.mode(oldKeywords='hidden')
    oldKeywords = schema.TextLine(
        title=_(u"Old Keywords"),
        required=False,
    )

    form.mode(oldCreateTime='hidden')
    oldCreateTime = schema.Datetime(
        title=_(u"Old Create Time"),
        required=False,
    )

    form.mode(oldEbookURL='hidden')
    oldEbookURL = schema.TextLine(
        title=_(u"Old Ebook URL"),
        required=False,
    )
Ejemplo n.º 6
0
class IForwarding(ITask):
    """Schema interface for forwardings.
    """

    # common fieldset
    form.omitted('task_type')

    # only hide relatedItems - we need it for remembering which documents
    # should be moved after creation when creating forwarding from tabbed view.
    form.mode(relatedItems=HIDDEN_MODE)

    # additional fieldset
    form.omitted('expectedStartOfWork')
    form.omitted('expectedDuration')
    form.omitted('expectedCost')
    form.omitted('effectiveDuration')
    form.omitted('effectiveCost')

    #only hide date_of_completion, it's used
    form.mode(date_of_completion=HIDDEN_MODE)

    # deadline is not required
    deadline = schema.Date(
        title=task_mf(u"label_deadline", default=u"Deadline"),
        description=task_mf(u"help_deadline", default=u""),
        required=False,
    )

    form.widget(responsible=AutocompleteFieldWidget)
    responsible = schema.Choice(
        title=_(u"label_responsible", default=u"Responsible"),
        description=_(u"help_responsible", default=""),
        vocabulary=u'opengever.ogds.base.InboxesVocabulary',
        required=True,
    )
Ejemplo n.º 7
0
class IProposar(form.Schema):
    """ Enviar missatge als membres /mail_message"""
    form.mode(intro='display')
    intro = TextLine(description=_(u"""
            La inclusió de punts nous en l'ordre del dia a iniciativa
            dels membres del Consell de Govern es regula en l'article
            7 del Reglament del Consell de Govern.
            En cas que els membres del Consell de Govern vulguin presentar
            punts nousque no han passat per cap comissió per alguna de les
            raons previstes en l'article, cal emplenar el formulari següent,
            que es tramet automàticament a la Secretaria General. Perquè la
            petició sigui admesa a tràmit, el formulari ha de tenir
            tots els camps emplenats.
            """), )
    # 1. Identificaci´o dels membres que presenten la proposta
    form.mode(one='display')

    one = TextLine(
        title=_(u"1. Identificació dels membres que presenten la proposta"), )
    numMembres = TextLine(title=_(u"Nombre de membres que fan la proposta"),
                          required=True)

    nomsMembres = TextLine(
        title=_(u"Nom i cognoms separats amb comes"),
        description=_(u"Cal annexar un document amb el nom i cognom, \
            el DNI i la signatura dels membres que presenten la \
            proposta (informació no pública)"),
        required=True)

    # 2. Identificacio de la persona que fa de ponent
    form.mode(two='display')
    two = TextLine(title=_(u"2. Identificació de la persona que fa de ponent"))

    nomPonent = TextLine(title=_(u"Nom i cognoms"), required=False)

    email = TextLine(title=_(u"Correu electrònic"), required=False)

    tlf = TextLine(title=_(u"Telèfon"), required=True)

    # 3 Punt de l'ordre del dia que es proposa incloure
    form.mode(three='display')
    three = TextLine(
        title=_(u"3. Punt de l'ordre del dia que es proposa incloure"), )

    acord = TextLine(title=_(u"Tipus: Acord"), required=True)

    puntInfo = TextLine(title=_(u"Punt informatiu"), required=True)

    title = TextLine(title=_(u"Enunciat o títol del punt de l'ordre del dia"),
                     required=True)

    justification = TextLine(title=_(u"Justificació"), required=True)

    text = schema.Text(title=_(u"Text que es presenta"), required=True)

    # 4 Annexar documents
    file = NamedBlobFile(title=_(u"4.  Annexar documents"),
                         description=_(u"(màxim 20mb)"))
class ITrainingRecord(form.Schema):
    """
    Uses IDublinCore
    """

    title = schema.TextLine(
        title=_(u"Meeting Date"),
        required=True,
        defaultFactory=computeTitle,
    )

    description = schema.Text(
        title=_(u"Summary"),
        description=_(u"A summary of the meeting."),
        required=False,
    )

    members_present = schema.List(
        title=_(u'Members in Attendance'),
        description=_(
            u"Select the booster members that attended tonight's meeting"),
        value_type=schema.Choice(
            vocabulary=u'docent.boosters.Training_Records', ),
        required=True,
    )

    form.mode(members_attended='hidden')
    members_attended = schema.List(
        title=_(u'Members Attended'),
        description=_(u"Booster Members Attended"),
        value_type=schema.ASCIILine(),
        required=False,
    )

    form.mode(members_absent='hidden')
    members_absent = schema.List(
        title=_(u'Members Absent'),
        description=_(u"Member Ids of members not attending the meeting."),
        value_type=schema.ASCIILine(),
        required=False,
    )

    form.mode(members_emailed='hidden')
    members_emailed = schema.List(
        title=_(u'Members Emailed'),
        description=_(u"Email address of club members emailed."),
        value_type=schema.TextLine(),
        required=False,
    )

    form.mode(missing_member_data='hidden')
    missing_member_data = schema.List(
        title=_(u'Missing Member Data'),
        description=_(u"Member ids with no member data"),
        value_type=schema.ASCIILine(),
        required=False,
    )
Ejemplo n.º 9
0
class IAcord(form.Schema):
    """ Acord """

    fieldset('acord',
             label=_(u'Tab acord'),
             fields=[
                 'title', 'proposalPoint', 'agreement', 'defaultContent',
                 'estatsLlista'
             ])

    dexteritytextindexer.searchable('title')
    title = schema.TextLine(title=_(u'Acord Title'), required=True)
    form.mode(proposalPoint='hidden')
    proposalPoint = schema.TextLine(
        title=_(u'Proposal point number'),
        required=False,
    )

    form.mode(agreement='hidden')
    dexteritytextindexer.searchable('agreement')
    agreement = schema.TextLine(
        title=_(u'Agreement number'),
        required=False,
    )

    directives.widget(defaultContent=WysiwygFieldWidget)
    dexteritytextindexer.searchable('defaultContent')
    defaultContent = schema.Text(
        title=_(u"Proposal description"),
        required=False,
    )

    estatsLlista = schema.Choice(
        title=_(u"Agreement and document label"),
        source=llistaEstats,
        required=True,
    )

    directives.omitted('estatVotacio')
    estatVotacio = schema.Choice(title=u'',
                                 source=llistaEstatsVotacio,
                                 required=False)

    directives.omitted('tipusVotacio')
    tipusVotacio = schema.Choice(title=u'',
                                 source=llistaTipusVotacio,
                                 required=False)

    directives.omitted('horaIniciVotacio')
    horaIniciVotacio = schema.Text(title=u'', required=False)

    directives.omitted('horaFiVotacio')
    horaFiVotacio = schema.Text(title=u'', required=False)

    directives.omitted('infoVotacio')
    infoVotacio = schema.Text(title=u'', required=False, default=u'{}')
Ejemplo n.º 10
0
class IConteudoBasico(form.Schema):
    """ Conteudo Basico"""

    form.mode(forms_id='hidden')
    forms_id = schema.TextLine(title=u"Form ID",
                               description=u"campo do formulario",
                               required=True)
    form.mode(instance_id='hidden')
    instance_id = schema.TextLine(
        title=u"Instance ID",
        description=u"campo da instancia do formulario",
        required=True)
Ejemplo n.º 11
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
Ejemplo n.º 12
0
class IContribPartner(model.Schema):
    """  Partner contributor
    """
    form.mode(IEditForm, title='display')
    title = schema.TextLine(
        title=_(u"Name"),
        required=True,
    )

    partner_roles = schema.Choice(
        title=_(u"Partner roles"),
        description=_(u"The role of partner in project"),
        source=utils.settings_partner_roles,
        required=False,
    )

    incash = schema.Decimal(
        title=_(u'In-cash'),
        required=False,
    )

    directives.mode(currency_incash='display')
    currency_incash = schema.TextLine(title=_(u""), )

    inkind = schema.Decimal(
        title=_(u'In-kind'),
        required=False,
    )

    directives.mode(currency_inkind='display')
    currency_inkind = schema.TextLine(title=_(u""), )
Ejemplo n.º 13
0
class IApenso(IBaseFormSchema):

    form.mode(protocolo_id='hidden')
    protocolo_id = schema.Int(
        title=_(u'ID do Protocolo'),
        description=_(u'Identificador do Protocolo.'),
        defaultFactory=getProtocoloId,
        required=False)

    form.widget(apenso_id=AutocompleteFieldWidget)
    apenso_id = schema.Choice(
        title=_(u'Apenso'),
        description=_(u'Número de Protocolo de Apenso'),
        vocabulary='il.spdo.protocolo-vocab',
        required=False)

    @interface.invariant
    def verifyApenso(apenso):
        if not apenso.apenso_id:
            return
        if not apenso.protocolo_id:
            raise interface.Invalid(_(u'O parâmetro protocolo_id não foi informado.'))
        if apenso.protocolo_id == apenso.apenso_id:
            raise interface.Invalid(_(u'O protocolo não pode ser apensado a ele mesmo.'))
        sc = getUtility(ISecurityChecker)
        if not sc.check('ciclo_apenso', protocolo_id=apenso.protocolo_id, apenso_id=apenso.apenso_id):
            raise interface.Invalid(_(u'Ciclo de apensos detectado!'))
        if not sc.check('momento_tramitacao', protocolo_id=apenso.protocolo_id, apenso_id=apenso.apenso_id):
            raise interface.Invalid(_(u'Para que um protocolo seja apensado em outro é necessário que ambos compartilhem o mesmo momento na tramitação, ou seja, estejam tramitando nas mesmas áreas e tenham o mesmo tipo de documento e protocolo.'))
Ejemplo n.º 14
0
class IGraphBehavior(form.Schema):
    """ Fields to construct text to use in graph application"""

    dtype = schema.Choice(
        title=u'type',
        required=True,
        values=(
            "salt",
            "fluorescens",
            "oxygene",
            "temp",
            "turbidity",
        ),
    )

    date1 = schema.Date(
        defaultFactory=theDefaultValue,
        min=datetime.date(2015, 5, 12),
        max=datetime.date.today(),
    )

    date2 = schema.Date(
        defaultFactory=theDefaultValue,
        min=datetime.date(2015, 5, 12),
        max=datetime.date.today(),
    )

    form.mode(plotly_html='hidden')
    plotly_html = schema.Text(
        title=u'Plotly html',
        default=u'Ingen relevante data ble funnet hos Gabriel',
        required=False,
    )
Ejemplo n.º 15
0
class ISubpunt(form.Schema):
    """ Subpunt: Molt similar el PUNT
    """
    fieldset(
        'subpunt',
        label=_(u'Tab subpunt'),
        fields=['title', 'proposalPoint', 'defaultContent', 'estatsLlista'])

    dexteritytextindexer.searchable('title')
    title = schema.TextLine(title=_(u'Subpunt Title'), required=True)

    form.mode(proposalPoint='hidden')
    proposalPoint = schema.TextLine(title=_(u'Proposal point number'),
                                    required=False)

    directives.widget(defaultContent=WysiwygFieldWidget)
    dexteritytextindexer.searchable('defaultContent')
    defaultContent = schema.Text(
        title=_(u"Proposal description"),
        required=False,
    )

    estatsLlista = schema.Choice(
        title=_(u"Agreement and document labels"),
        source=llistaEstats,
        required=True,
    )
Ejemplo n.º 16
0
class IArea(IBaseFormSchema):

    form.mode(id='hidden')
    id = schema.Int(
        title=_(u'ID'),
        description=_(u'Identificador da Área.'),
        required=False)

    sigla = schema.TextLine(
        title=_(u'Sigla'),
        description=_(u'Informe a sigla da  Área.'),
        max_length=20)
    
    nome = schema.TextLine(
        title=_(u'Nome'),
        description=_(u'Informe o nome da Área.'),
        max_length=100)

    chefia_id = schema.Choice(
        title=_(u'Chefia'),
        description=_(u'Selecione a Área de Chefia.'),
        required=False,
        vocabulary='il.spdo.areas-vocab')

    # TODO: validar ciclos
    @interface.invariant
    def verifyAreaPai(area):
        if area.id and area.chefia_id and area.id == area.chefia_id:
            raise interface.Invalid(_(u'A área de chefia precisa ser diferente da própria área. Se a área não possuir chefia, não selecione nenhuma área.'))
Ejemplo n.º 17
0
class ISearchAndReserveForm(model.Schema):
    """ Search form for search & reserve view. """

    form.mode(timeframes='hidden')
    timeframes = schema.Text(title=_(u'Timeframes'),
                             default=u'',
                             required=False)

    recurrence_start = schema.Date(title=_(u"Start date"), required=True)

    recurrence_end = schema.Date(title=_(u"End date"), required=True)

    whole_day = schema.Bool(title=_(u"Whole day"),
                            required=False,
                            default=False)

    start_time = schema.Time(title=_(u"Start time"), required=False)

    end_time = schema.Time(title=_(u"End time"), required=False)

    form.widget(days=CheckBoxFieldWidget)
    days = schema.List(title=_(u"Days"),
                       value_type=schema.Choice(vocabulary=weekdays),
                       required=False)

    minspots = schema.Int(title=_(u"Spots"), required=False)

    available_only = schema.Bool(title=_(u"Available only"),
                                 required=False,
                                 default=True)
Ejemplo n.º 18
0
class IFluxo(IBaseFormSchema):

    form.mode(id='hidden')
    id = schema.Int(
        title=_(u'ID'),
        description=_(u'Identificador do Fluxo.'),
        required=False)

    nome = schema.TextLine(
        title=_(u'Nome'),
        description=_(u'Informe o nome do fluxo.'))

    tipoprotocolo = schema.Choice(
        title=_(u'Tipo de Protocolo'),
        description=_(u'Selecione o tipo do protocolo.'),
        vocabulary='il.spdo.tipoprotocolo-vocab')

    tipodocumento_id = schema.Choice(
        title=_(u'Tipo de Documento'),
        description=_(u'Selecione o tipo do documento.'),
        vocabulary='il.spdo.tipodocumento-vocab')

    flexivel = schema.Bool(
        title=_(u'Flexível'),
        description=_(u'O fluxo possui tramitação flexível?'),
        required=False)
Ejemplo n.º 19
0
class IRequestMobileNumberResetForm(form.Schema):
    """
    Interface for the request to reset the SMS Authenticator mobile number form.
    """
    username = TextLine(
        title=_(u'Username'),
        description=_(u'Enter your username for verification.'),
        required=True)
    mobile_number = TextLine(
        title=_(u'Mobile number'),
        description=_(
            u"Enter your mobile phone number. Use the international format.\
            <br/>Example Dutch number: +31699555555\
            <br/>Example International number: +49234555776"),
        required=True)
    form.mode(note='display')
    note = TextLine(
        title=_(u"Important note"),
        default=u"",
        readonly=True,
        required=False,
        description=
        _(u"After submitting this form, you will receive an e-mail with a link and a SMS with a code. \
    <br/><br/> To successfully verify your mobile number, open the link from your e-mail in a browser and enter the code from your SMS in the form."
          ))
Ejemplo n.º 20
0
class IServerNode(model.Schema, IImageScaleTraversable):
    """
    Server details
    """
    server = schema.TextLine(
        title=_(u"Server Name"),
        description=_(u"Enter a fully qualified servername"),
        required=True)
    ip = schema.TextLine(
        title=_(u"IP Address"),
        required=False,
    )
    machine = schema.TextLine(
        title=_(u"Physical Server"),
        description=_(u"name of the physical machine this virtual server "
                      u"is located on"),
        required=False,
    )
    protocol = schema.TextLine(
        title=_(u"Request Protocol"),
        description=_(u"Specify alternative protocol e.g. smtp for mx server"),
        default=u"http",
        required=True)
    form.mode(serverdetails='hidden')
    serverdetails = schema.TextLine(
        title=_(u"server Details"),
        description=_(u"Serverdetails json storage. You normally should have "
                      u"no need to change this manually"),
        required=False,
    )
Ejemplo n.º 21
0
        class IDummy(form.Schema):

            form.omitted('foo', 'bar')
            form.omitted(form.Schema, 'qux')
            form.no_omit(form.Schema, 'bar')
            form.widget(foo='some.dummy.Widget', baz='other.Widget')
            form.mode(bar='hidden')
            form.mode(form.Schema, bar='input')
            form.order_before(baz='title')
            form.order_after(qux='title')
            form.read_permission(foo='zope2.View')
            form.write_permission(foo='cmf.ModifyPortalContent')

            foo = zope.schema.TextLine(title=u"Foo")
            bar = zope.schema.TextLine(title=u"Bar")
            baz = zope.schema.TextLine(title=u"Baz")
            qux = zope.schema.TextLine(title=u"Qux")
Ejemplo n.º 22
0
class IPlotlyBehavior(form.Schema):
    """ Can be 'plotlified' """

    form.mode(plotly_html='hidden')
    plotly_html = schema.Text(
        title=u'Plotly html',
        default=u'You must reload the page to see the graph',
        required=False,
    )
 def update(self):
     if self.show_recaptcha_widget():
         self.fields = field.Fields(IClaim).select('captcha')
         from plone.formwidget.recaptcha import ReCaptchaFieldWidget
         self.fields['captcha'].widgetFactory = ReCaptchaFieldWidget
         self.fields.widgetFactory = form.mode(captcha='display')
     # XXX: currently, any user can add a claim
     #      do we need to check if the user is anonymous?
     super(AddView, self).update()
Ejemplo n.º 24
0
class IObservacao(IBaseFormSchema):

    form.mode(id='hidden')
    id = schema.Int(
        title=_(u'ID'),
        description=_(u'Identificador da Observação.'),
        required=False)

    form.mode(protocolo_id='hidden')
    protocolo_id = schema.Int(
        title=_(u'ID do Protocolo'),
        description=_(u'Identificador do Protocolo.'),
        defaultFactory=getProtocoloId,
        required=False)

    texto = schema.Text(
        title=_(u'Texto'),
        description=_(u'Texto da Observação.'))
 def update(self):
     if self.show_recaptcha_widget():
         self.fields = field.Fields(IClaim).select('captcha')
         from plone.formwidget.recaptcha import ReCaptchaFieldWidget
         self.fields['captcha'].widgetFactory = ReCaptchaFieldWidget
         self.fields.widgetFactory = form.mode(captcha='display')
     # XXX: currently, any user can add a claim
     #      do we need to check if the user is anonymous?
     super(AddView, self).update()
Ejemplo n.º 26
0
class IStack(form.Schema, IImageScaleTraversable):
    """
    A folderish content stack
    """
    assignment = schema.TextLine(
        title=_(u"Assigments"),
        description=_(u"JSON formated listing of assignments"),
        required=False,
    )
    form.mode(assignment="hidden")
Ejemplo n.º 27
0
class ITraitsDataset(form.Schema):

    form.mode(genre='hidden')
    genre = schema.Choice(
        title=_(u'Data Genre'),
        default='DataGenreTraits',
        vocabulary='genre_source',
        readonly=True,
        required=True,
    )
Ejemplo n.º 28
0
class IRentClubhousesForm(form.Schema):
    """

    """
    form.mode(fullname='display')
    fullname = schema.ASCIILine(title=_(u"Name"),
                                description=_(u""),
                                required=False,)

    form.mode(account='display')
    account = schema.ASCIILine(title=_(u"Management Trust Account"),
                               description=_(u""),
                               required=False,)

    form.mode(address='display')
    address = schema.TextLine(title=_(u"Address"),
                              description=_(u""),
                              required=False,)

    form.mode(division='display')
    division = schema.ASCIILine(title=_(u"Division"),
                                description=_(u""),
                                required=False,)

    form.mode(lot='display')
    lot = schema.ASCIILine(title=_(u"Lot"),
                           description=_(u""),
                           required=False,)

    phone = schema.ASCIILine(title=_(u"Phone"),
                             description=_(u"Enter your phone number."),
                             required=False,)

    form.mode(email='display')
    email = schema.ASCIILine(title=_(u"Email"),
                             description=_(u""),
                             required=False,)

    form.mode(member_type='display')
    member_type = schema.ASCIILine(title=_(u"I am a Meadows"))

    form.widget('date', DateWidget)
    date = schema.Date(title=_(u"Reservation Date"),
                       description=_(u"All reservations are from 10AM-10PM. Reservations cannot be made on the same day of the event."),
                       required=True,
                       defaultFactory=getTodaysDate,
                       constraint=validateDate,)

    accept_rental_agreement = schema.Bool(title=_(u"Rental Agreement"),
                                          description=_(u"I have read and accept the rental agreement."),
                                          required=True,
                                          constraint=validateAccept)

    initials = schema.TextLine(title=_(u"Initials"),
                               description=_(u"Enter your initials."),
                               required=True,
                               max_length=3)
Ejemplo n.º 29
0
class ITipoEntrega(IBaseFormSchema):

    form.mode(id='hidden')
    id = schema.Int(
        title=_(u'ID'),
        description=_(u'Identificador do Tipo de Entrega.'),
        required=False)

    nome = schema.TextLine(
        title=_(u'Nome'),
        description=_(u'Informe o nome do tipo do entrega.'))
Ejemplo n.º 30
0
class IAppointmentDay(form.Schema):
    appointment_date = schema.Date(
        title=_(u'Visit Date'),
        description=_(u'The date of this visit'),
    )

    #Quick fix until context is properly implemented
    form.mode(include_weekends='hidden')
    include_weekends = schema.Bool(
        title=u'Include Weekends',
        description=u'Do you want to include weekends?')
Ejemplo n.º 31
0
class IMeetingAdvice(IDXMeetingContent):
    """
        MeetingAdvice schema
    """

    advice_group = LocalRoleField(
        title=_(u'Group'),
        description=_(u"Choose a group."),
        vocabulary=
        u'Products.PloneMeeting.content.advice.advice_group_vocabulary',
        required=True,
    )
    advice_type = schema.Choice(
        title=_(u'Advice type'),
        description=_(u"Choose an advice type."),
        vocabulary=
        u'Products.PloneMeeting.content.advice.advice_type_vocabulary',
        required=True,
    )
    form.widget('advice_hide_during_redaction', RadioFieldWidget)
    advice_hide_during_redaction = schema.Bool(
        title=_(u'Hide advice during redaction'),
        description=
        _("If you do not want the advice to be shown immediately after redaction, you can check this "
          "box.  This will let you or other member of your group work on the advice before showing it.  "
          "Note that if you lose access to the advice (for example if the item state evolve), "
          "the advice will be considered 'Not given, was under edition'.  A manager will be able "
          "to publish it nevertheless."),
        required=False,
    )
    form.widget('advice_comment', PMRichTextFieldWidget)
    advice_comment = RichText(title=_(u"Advice official comment"),
                              description=_("Enter the official comment."),
                              required=False,
                              allowed_mime_types=(u"text/html", ))
    form.widget('advice_observations', PMRichTextFieldWidget)
    advice_observations = RichText(
        title=_(u"Advice observations"),
        description=_("Enter optionnal observations if necessary."),
        required=False,
        allowed_mime_types=(u"text/html", ))
    advice_reference = schema.TextLine(
        title=_(u"Advice reference"),
        description=_("Enter a reference for this advice if necessary."),
        required=False,
    )
    form.mode(advice_row_id='hidden')
    advice_row_id = schema.TextLine(
        title=_(u"Advice row id"),
        description=_(
            "Linked advice row id, this is managed programmatically."),
        required=False,
    )