示例#1
0
文件: form.py 项目: it3s/mootiro_form
 def _get_schema_and_form(self, form):
     form_schema = create_form_schema(form)
     entry_form = make_form(
         form_schema,
         i_template="form_mapping_item",
         buttons=[form.submit_label if form.submit_label else _("Submit")],
         action=(self.url("form", action="view", id=form.id)),
     )
     return form_schema, entry_form
示例#2
0
 def _get_schema_and_form(self, form, slug=None):
     if not slug:
         slug = self.request.matchdict['slug']
     form_schema = create_form_schema(form)
     entry_form = make_form(form_schema, i_template='form_mapping_item',
         buttons=[form.submit_label if form.submit_label else _('Submit')],
         action=(self.url('entry_form_slug', action='save_entry',
                 slug=slug)))
     return form_schema, entry_form
示例#3
0
 def _get_schema_and_form(self, form, slug=None):
     if not slug:
         slug = self.request.matchdict['slug']
     form_schema = create_form_schema(form)
     entry_form = make_form(
         form_schema,
         i_template='form_mapping_item',
         buttons=[form.submit_label if form.submit_label else _('Submit')],
         action=(self.url('entry_form_slug', action='save_entry',
                          slug=slug)))
     return form_schema, entry_form
示例#4
0
文件: form.py 项目: it3s/mootiro_form
 def _get_schema_and_form(self, form):
     form_schema = create_form_schema(form)
     entry_form = make_form(form_schema, i_template='form_mapping_item',
         buttons=[form.submit_label if form.submit_label else _('Submit')],
         action=(self.url('form', action='view', id=form.id)))
     return form_schema, entry_form