Ejemplo n.º 1
0
 def __init__(self,
              schema,
              action='',
              method='POST',
              buttons=(),
              formid='deform',
              use_ajax=False,
              ajax_options='{}',
              autocomplete=None,
              **kw):
     field.Field.__init__(self, schema, **kw)
     _buttons = []
     for button in buttons:
         if isinstance(button, string_types):
             button = Button(button)
         _buttons.append(button)
     self.action = action
     self.method = method
     self.buttons = _buttons
     self.formid = formid
     self.use_ajax = use_ajax
     if autocomplete is None:
         self.autocomplete = None
     elif autocomplete:
         self.autocomplete = 'on'
     else:
         self.autocomplete = 'off'
     self.ajax_options = Raw(ajax_options.strip())
     self.widget = widget.FormWidget()
Ejemplo n.º 2
0
 def __init__(self,
              schema,
              action='',
              method='POST',
              buttons=(),
              formid='deform',
              use_ajax=False,
              ajax_options='{}',
              **kw):
     field.Field.__init__(self, schema, **kw)
     _buttons = []
     for button in buttons:
         if isinstance(button, basestring):
             button = Button(button)
         _buttons.append(button)
     self.action = action
     self.method = method
     self.buttons = _buttons
     self.formid = formid
     self.use_ajax = use_ajax
     self.ajax_options = Raw(ajax_options.strip())
     self.widget = widget.FormWidget()