Exemplo n.º 1
0
Arquivo: form.py Projeto: calston/tums
 def __init__(self, name, label=None, description=None, cssClass=None):
     if label is None:
         label = util.titleFromName(name)
     self.name = name
     self.label = label
     self.description = description
     self.cssClass = cssClass
     self.items = FormItems(self)
     # Forward to FormItems methods
     self.add = self.items.add
     self.getItemByName = self.items.getItemByName
Exemplo n.º 2
0
 def __init__(self, name, label=None, description=None, cssClass=None):
     if label is None:
         label = util.titleFromName(name)
     self.name = name
     self.label = label
     self.description = description
     self.cssClass = cssClass
     self.items = FormItems(self)
     # Forward to FormItems methods
     self.add = self.items.add
     self.getItemByName = self.items.getItemByName
Exemplo n.º 3
0
Arquivo: form.py Projeto: bne/squeal
    def __init__(self, callback, name, validate, label):

        if not util.validIdentifier(name):
            import warnings
            warnings.warn('[0.9] Invalid action name %r. This will become an error in the future.' %
                    name, FutureWarning, stacklevel=3)

        self.callback = callback
        self.name = name
        self.validate = validate
        if label is None:
            self.label = util.titleFromName(name)
        else:
            self.label = label
Exemplo n.º 4
0
Arquivo: form.py Projeto: bne/squeal
 def __init__(self, name, type, widgetFactory=None, label=None,
         description=None, cssClass=None):
     if not util.validIdentifier(name):
         raise ValueError('%r is an invalid field name'%name)
     if label is None:
         label = util.titleFromName(name)
     if widgetFactory is None:
         widgetFactory = iformal.IWidget
     self.name = name
     self.type = type
     self.widgetFactory = widgetFactory
     self.label = label
     self.description = description
     self.cssClass = cssClass
Exemplo n.º 5
0
 def __init__(self, name, type, widgetFactory=None, label=None,
         description=None, cssClass=None):
     if not util.validIdentifier(name):
         raise ValueError('%r is an invalid field name'%name)
     if label is None:
         label = util.titleFromName(name)
     if widgetFactory is None:
         widgetFactory = iformal.IWidget
     self.name = name
     self.type = type
     self.widgetFactory = widgetFactory
     self.label = label
     self.description = description
     self.cssClass = cssClass
Exemplo n.º 6
0
    def __init__(self, callback, name, validate, label):

        if not util.validIdentifier(name):
            import warnings
            warnings.warn('[0.9] Invalid action name %r. This will become an error in the future.' %
                    name, FutureWarning, stacklevel=3)

        self.callback = callback
        self.name = name
        self.validate = validate
        if label is None:
            self.label = util.titleFromName(name)
        else:
            self.label = label
Exemplo n.º 7
0
 def __init__(self, name, label=None, description=None, cssClass=None, childCreationCallback=None):
     if label is None:
         label = util.titleFromName(name)
     self.name = name
     self.label = label
     self.description = description
     self.cssClass = cssClass
     if childCreationCallback is None:
         raise Exception('must give childCreationCallback')
     self.childCreationCallback = childCreationCallback
     self.items = form.FormItems(self)
     self.add = self.items.add
     self.getItemByName = self.items.getItemByName
     self.collapsible = False
     self.collapsed = False
     self.summary = None