for each field."""
- output = ""
- for field in fields:
- try:
- # create a field instance for the bound field
- field_instance = self.fields[field]
- except KeyError:
- # could not create the instance so throw an exception
- # msg on a separate line since the line got too long
- # otherwise
- msg = "Could not resolve form field '%s'." % field
- raise FieldsetError(msg)
- # create a bound field containing all the necessary fields
- # from the form
- bound_field = BoundField(self, field_instance, field)
- output += '
%(label)s%(help_text)s%' \
- '(errors)s%(field)s
\n' % \
- {'class': bound_field.name,
- 'label': bound_field.label,
- 'help_text': bound_field.help_text,
- 'errors': bound_field.errors,
- 'field': unicode(bound_field)}
- return output
diff --git a/src/postorius/forms.py b/src/postorius/forms.py
index abf7e85..47edc9b 100644
--- a/src/postorius/forms.py
+++ b/src/postorius/forms.py
@@ -24,8 +24,6 @@
from django.utils.translation import ugettext_lazy as _
from django.utils.version import get_complete_version
-from postorius.fieldset_forms import FieldsetForm
-
ACTION_CHOICES = (
("hold", _("Hold for moderation")),
@@ -57,7 +55,7 @@
return result
-class DomainNew(FieldsetForm):
+class DomainNew(forms.Form):
"""
Form field to add a new domain
@@ -104,7 +102,7 @@
'invalid': _('Please enter a valid email adddress.')})
-class ListNew(FieldsetForm):
+class ListNew(forms.Form):
"""
Form fields to add a new list. Languages are hard coded which should
@@ -175,7 +173,7 @@
"advertised"], ]
-class ListSubscribe(FieldsetForm):
+class ListSubscribe(forms.Form):
"""Form fields to join an existing list.
"""
@@ -620,7 +618,7 @@
[(key, key) for key in archivers.keys()])
-class ListMassSubscription(FieldsetForm):
+class ListMassSubscription(forms.Form):
"""Form fields to masssubscribe users to a list.
"""
emails = ListOfStringsField(
@@ -637,7 +635,7 @@
)
-class ListMassRemoval(FieldsetForm):
+class ListMassRemoval(forms.Form):
"""Form fields to remove multiple list users.
"""
@@ -712,7 +710,7 @@
orders.append(order)
-class UserPreferences(FieldsetForm):
+class UserPreferences(forms.Form):
"""
Form handling the user's global, address and subscription based preferences
@@ -795,7 +793,7 @@
"delivery_mode", "delivery_status"]]
-class MemberModeration(FieldsetForm):
+class MemberModeration(forms.Form):
"""
Form handling the member's moderation_action.
"""