--- a/web/formfields.py Tue May 12 20:17:49 2009 +0200
+++ b/web/formfields.py Tue May 12 20:18:19 2009 +0200
@@ -334,6 +334,9 @@
super(IntField, self).__init__(**kwargs)
self.min = min
self.max = max
+ if isinstance(self.widget, TextInput):
+ self.widget.attrs.setdefault('size', 5)
+ self.widget.attrs.setdefault('maxlength', 15)
class BooleanField(Field):
widget = Radio
@@ -372,7 +375,7 @@
class TimeField(DateField):
format_prop = 'ui.datetime-format'
- widget = TextInput
+ widget = TextInput
class HiddenInitialValueField(Field):
def __init__(self, visible_field):
@@ -384,6 +387,7 @@
class RelationField(Field):
def __init__(self, **kwargs):
+ kwargs.setdefault('sort', False)
super(RelationField, self).__init__(**kwargs)
@staticmethod