# HG changeset patch # User Sverre Rabbelier # Date 1234469657 0 # Node ID 005be2cf889d2164689452ccb81eee9f816ad0ab # Parent b42088df39585c07f634c835912c31d08b6bd5f1 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 diff -r b42088df3958 -r 005be2cf889d app/soc/views/helper/templatetags/forms_helpers.py --- 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 = {}