removed some un-necessary has_attr
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.0.9 (2012-09-27 14:21:51) stable
|
Version 2.0.9 (2012-09-27 14:43:52) stable
|
||||||
|
|||||||
+5
-7
@@ -174,8 +174,7 @@ class TextWidget(FormWidget):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
default = dict(value = value)
|
default = dict(value = value)
|
||||||
attr = cls._attributes(field, default,
|
attr = cls._attributes(field, default,**attributes)
|
||||||
**attributes)
|
|
||||||
return TEXTAREA(**attr)
|
return TEXTAREA(**attr)
|
||||||
|
|
||||||
|
|
||||||
@@ -1023,11 +1022,11 @@ class SQLFORM(FORM):
|
|||||||
else:
|
else:
|
||||||
inp = field.formatter(default)
|
inp = field.formatter(default)
|
||||||
elif field.type == 'upload':
|
elif field.type == 'upload':
|
||||||
if hasattr(field, 'widget') and field.widget:
|
if field.widget:
|
||||||
inp = field.widget(field, default, upload)
|
inp = field.widget(field, default, upload)
|
||||||
else:
|
else:
|
||||||
inp = self.widgets.upload.widget(field, default, upload)
|
inp = self.widgets.upload.widget(field, default, upload)
|
||||||
elif hasattr(field, 'widget') and field.widget:
|
elif field.widget:
|
||||||
inp = field.widget(field, default)
|
inp = field.widget(field, default)
|
||||||
elif field.type == 'boolean':
|
elif field.type == 'boolean':
|
||||||
inp = self.widgets.boolean.widget(field, default)
|
inp = self.widgets.boolean.widget(field, default)
|
||||||
@@ -1278,7 +1277,7 @@ class SQLFORM(FORM):
|
|||||||
if not field.widget and field.type.startswith('list:') and \
|
if not field.widget and field.type.startswith('list:') and \
|
||||||
not OptionsWidget.has_options(field):
|
not OptionsWidget.has_options(field):
|
||||||
field.widget = self.widgets.list.widget
|
field.widget = self.widgets.list.widget
|
||||||
if hasattr(field, 'widget') and field.widget and fieldname in request_vars:
|
if field.widget and fieldname in request_vars:
|
||||||
if fieldname in self.vars:
|
if fieldname in self.vars:
|
||||||
value = self.vars[fieldname]
|
value = self.vars[fieldname]
|
||||||
elif self.record:
|
elif self.record:
|
||||||
@@ -1980,8 +1979,7 @@ class SQLFORM(FORM):
|
|||||||
if columns and not str(field) in columns: continue
|
if columns and not str(field) in columns: continue
|
||||||
if not field.readable: continue
|
if not field.readable: continue
|
||||||
key = str(field)
|
key = str(field)
|
||||||
header = headers.get(str(field),
|
header = headers.get(str(field), field.label or key)
|
||||||
hasattr(field,'label') and field.label or key)
|
|
||||||
if sortable:
|
if sortable:
|
||||||
if key == order:
|
if key == order:
|
||||||
key, marker = '~'+order, sorter_icons[0]
|
key, marker = '~'+order, sorter_icons[0]
|
||||||
|
|||||||
Reference in New Issue
Block a user