Do not attempt to render a field if it is disabled
This is required to make it possible to disable fields dynamically.
Patch by: Sverre Rabbelier
--- a/app/soc/views/helper/templatetags/forms_helpers.py Thu Feb 12 20:13:51 2009 +0000
+++ b/app/soc/views/helper/templatetags/forms_helpers.py Thu Feb 12 20:14:17 2009 +0000
@@ -172,6 +172,9 @@
# Iterate over all fields and prepare it for adding
for name, field in form.fields.items():
+ if not field:
+ continue
+
bf = forms_in.BoundField(form, field, name)
attrs = {}