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())
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
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'')