Beispiel #1
0
def dropbox_submit(request):
    form = deform.Form(dropbox_schema,
        buttons=[deform.Button('submit', _('Submit'))],
        action=request.url,
        formid='briefkasten-form')
    form['attachments'].widget = deform.widget.SequenceWidget(
        min_len=attachments_min_len,
        max_len=attachments_min_len,
        title=_(u'Add another file'))
    return dict(title=title,
        drop_id=None, form_submitted=False,
        form=form.render())
Beispiel #2
0
def dropbox_submit(request):
    form = deform.Form(dropbox_schema,
        buttons=[deform.Button('submit', _('Submit'))],
        action=request.url,
        formid='briefkasten-form')
    form['attachments'].widget = deform.widget.SequenceWidget(
        min_len=attachments_min_len,
        max_len=attachments_max_len,
        add_subitem_text_template=_(u'Add another file'))
    appstruct = defaults()
    appstruct.update(drop_id=None,
        form_submitted=False,
        form=form.render())
    return appstruct
Beispiel #3
0
class DropboxSchema(colander.MappingSchema):
    message = colander.SchemaNode(
        colander.String(),
        title=_(u'Anonymous submission to the editors'),
        missing=None)
    upload = colander.SchemaNode(_FieldStorage(), missing=None)
    testing_secret = colander.SchemaNode(colander.String(), missing=u'')